diff options
| author | Adnan Maolood <[email protected]> | 2021-02-15 00:16:21 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-02-15 00:16:21 -0500 |
| commit | 96a84ddd38568dd6d69b0d6ed55b743f6c69290c (patch) | |
| tree | b8691a656d59583472198153d4e6f5fffc192b6c /request.go | |
| parent | server: Implement Close and Shutdown methods (diff) | |
| download | go-gemini-96a84ddd38568dd6d69b0d6ed55b743f6c69290c.tar.xz go-gemini-96a84ddd38568dd6d69b0d6ed55b743f6c69290c.zip | |
request: Don't read more than 1026 bytes
Diffstat (limited to 'request.go')
| -rw-r--r-- | request.go | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -87,6 +87,7 @@ func NewRequestFromURL(url *url.URL) *Request { // to read requests and handle them via the Handler interface. func ReadRequest(r io.Reader) (*Request, error) { // Read URL + r = io.LimitReader(r, 1026) br := bufio.NewReaderSize(r, 1026) rawurl, err := br.ReadString('\r') if err != nil { |