1
1
Fork 0
mirror of https://tildegit.org/solderpunk/molly-brown synced 2024-05-12 16:06:03 +02:00

Close stdin of CGI process after sending URL.

This commit is contained in:
Solderpunk 2019-11-30 19:52:20 +02:00
parent 0b4fefd0ba
commit 40ad09f9bc

View File

@ -137,6 +137,7 @@ func handleGeminiRequest(conn net.Conn, config Config, logEntries chan LogEntry)
defer stdin.Close()
io.WriteString(stdin, URL.String())
io.WriteString(stdin, "\r\n")
stdin.Close()
out, err := cmd.Output()
if ctx.Err() == context.DeadlineExceeded {
conn.Write([]byte("42 CGI process timed out!\r\n"))