1
0
mirror of https://git.sr.ht/~adnano/go-gemini synced 2024-09-18 13:31:36 +02:00
Commit Graph

43 Commits

Author SHA1 Message Date
adnano
53ac2371ef Use bytes.CutSuffix to trim CRLF 2024-03-10 09:35:32 -04:00
adnano
ca2680a958 Tweak request and response parsing 2021-03-20 12:27:20 -04:00
adnano
d3b69f7cdb Request.WriteTo: return int64 2021-02-28 22:20:59 -05:00
adnano
c05a974c36 Make Request implement io.WriterTo 2021-02-28 22:16:38 -05:00
adnano
f2adf125a1 Mention that Request methods don't work for clients 2021-02-28 21:59:19 -05:00
adnano
3a574de7cc Remove Request.RemoteAddr helper method 2021-02-28 21:52:41 -05:00
adnano
839418a2b7 request: Add RemoteAddr helper function 2021-02-27 14:03:33 -05:00
adnano
a30938e3bd request: Add ServerName helper method 2021-02-27 14:02:30 -05:00
adnano
bda3436707 request: Cache calls to TLS 2021-02-27 13:59:45 -05:00
adnano
5126abe562 Move ResponseWriter Conn and TLS methods to Request 2021-02-24 08:24:49 -05:00
adnano
c27c934ec1 request: Remove TLS and Conn methods 2021-02-23 20:57:53 -05:00
adnano
4d7bb87110 Update documentation 2021-02-23 18:45:58 -05:00
adnano
45ba4cc219 request: Fix documentation for TLS 2021-02-23 17:30:46 -05:00
adnano
45e432a71b request: Add Conn and TLS methods 2021-02-23 17:29:50 -05:00
adnano
3c07af62f7 server: Populate Request.Host field 2021-02-20 18:12:51 -05:00
adnano
b19cfcad16 server: Make Request.RemoteAddr a net.Addr
A concrete type is better.
2021-02-20 16:27:35 -05:00
adnano
bb51cd4eb6 client: Make Get and Do accept a Context
This removes the need for Request.Context.
2021-02-20 15:34:21 -05:00
adnano
e3cb6a067e server: Make Request.RemoteAddr a string 2021-02-20 13:31:55 -05:00
adnano
180605cd5f client: Allow Request.Host to omit a port 2021-02-20 13:30:55 -05:00
adnano
e38ab376f7 request.Write: Accept an io.Writer 2021-02-18 21:58:37 -05:00
adnano
48e5ca5701 request.Write: return error from Flush 2021-02-18 21:54:38 -05:00
adnano
087c8a62e7 request: Allow User in URLs 2021-02-16 00:55:56 -05:00
adnano
317faffdeb Remove NewRequestFromURL method
Use a Request struct literal instead.
2021-02-15 17:23:56 -05:00
adnano
924bb31496 request: Don't read more than 1026 bytes 2021-02-15 00:16:21 -05:00
adnano
b8a6078815 Tweak returned error for requests that are too long
Return ErrInvalidRequest instead of ErrInvalidURL in Request.Write.
2021-02-14 23:33:18 -05:00
adnano
2bb0725cc4 Make Request.Host optional 2021-02-14 19:02:34 -05:00
adnano
8c35c85ab2 server: Don't populate Request.Certificate field
Handlers should instead use the certificate provided in Request.TLS.
2021-02-14 17:34:57 -05:00
adnano
128cf1b6ec Update documentation 2021-02-14 15:50:41 -05:00
adnano
d93adc7908 Make TLS field nil for unencrypted connections 2021-02-08 12:32:49 -05:00
adnano
106d0b1c1d Update comments 2021-01-10 01:07:38 -05:00
adnano
c35dc332d3 Update Request documentation 2020-12-18 01:43:18 -05:00
adnano
cc962586d4 Add ReadRequest and ReadResponse functions 2020-12-18 01:42:05 -05:00
adnano
b9a9b65d0b Expose Request.Write and Response.Read functions 2020-12-18 01:14:06 -05:00
adnano
70bb9c4e59 Allow Request.Context to be nil 2020-12-17 17:16:55 -05:00
adnano
d37431fd29 Fix escaping of queries 2020-11-27 22:27:52 -05:00
adnano
611af9f6ed Add context to requests 2020-11-26 00:42:25 -05:00
adnano
1fb24b625f Remove some unnecessary errors 2020-11-04 23:46:05 -05:00
adnano
386b1c56da server: Populate (*Request).Certificate field 2020-11-01 16:25:59 -05:00
adnano
75506c176c Reject schemes other than gemini:// in NewRequest 2020-10-27 21:18:05 -04:00
adnano
d713e95251 Add (*Client).Get function 2020-10-27 19:22:34 -04:00
adnano
1293b2467a Add NewRequestFromURL function 2020-10-27 13:27:52 -04:00
adnano
6cccba3800 Rename repository to go-gemini 2020-10-24 15:15:32 -04:00
adnano
dda63807b5 Refactor 2020-10-21 17:07:28 -04:00