mirror of
https://tildegit.org/solderpunk/molly-brown
synced 2024-05-23 17:16:04 +02:00
Close stdin of CGI process after sending URL.
This commit is contained in:
parent
0b4fefd0ba
commit
40ad09f9bc
|
@ -137,6 +137,7 @@ func handleGeminiRequest(conn net.Conn, config Config, logEntries chan LogEntry)
|
||||||
defer stdin.Close()
|
defer stdin.Close()
|
||||||
io.WriteString(stdin, URL.String())
|
io.WriteString(stdin, URL.String())
|
||||||
io.WriteString(stdin, "\r\n")
|
io.WriteString(stdin, "\r\n")
|
||||||
|
stdin.Close()
|
||||||
out, err := cmd.Output()
|
out, err := cmd.Output()
|
||||||
if ctx.Err() == context.DeadlineExceeded {
|
if ctx.Err() == context.DeadlineExceeded {
|
||||||
conn.Write([]byte("42 CGI process timed out!\r\n"))
|
conn.Write([]byte("42 CGI process timed out!\r\n"))
|
||||||
|
|
Loading…
Reference in New Issue