mirror of
https://tildegit.org/solderpunk/molly-brown.git
synced 2025-04-13 09:29:46 +00:00
Fix line endings in response headers.
This commit is contained in:
parent
fc730c8b1c
commit
4e262d634a
1 changed files with 3 additions and 3 deletions
|
@ -32,11 +32,11 @@ func handleGeminiRequest(conn net.Conn, config Config, logEntries chan LogEntry)
|
|||
reader := bufio.NewReaderSize(conn, 1024)
|
||||
request, overflow, err := reader.ReadLine()
|
||||
if overflow {
|
||||
conn.Write([]byte("59 Request too long!r\n"))
|
||||
conn.Write([]byte("59 Request too long!\r\n"))
|
||||
log.Status = 59
|
||||
return
|
||||
} else if err != nil {
|
||||
conn.Write([]byte("40 Unknown error reading request!r\n"))
|
||||
conn.Write([]byte("40 Unknown error reading request!\r\n"))
|
||||
log.Status = 40
|
||||
return
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ func handleGeminiRequest(conn net.Conn, config Config, logEntries chan LogEntry)
|
|||
// Parse request as URL
|
||||
URL, err := url.Parse(string(request))
|
||||
if err != nil {
|
||||
conn.Write([]byte("59 Error parsing URL!r\n"))
|
||||
conn.Write([]byte("59 Error parsing URL!\r\n"))
|
||||
log.Status = 59
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue