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
1 changed files with 1 additions and 0 deletions

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"))