mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-10 19:29:32 +00:00
further steps to get rid of deprecated endOfFile and readLine
This commit is contained in:
@@ -144,10 +144,12 @@ proc executeCgi(client: TSocket, path, query: string, meth: TRequestMethod) =
|
||||
dealloc(buf)
|
||||
|
||||
var outp = process.outputStream
|
||||
while running(process) or not atEnd(outp):
|
||||
var line = outp.readLine()
|
||||
send(client, line.string)
|
||||
send(client, wwwNL)
|
||||
var line = newStringOfCap(120).TaintedString
|
||||
while true:
|
||||
if outp.readLine(line):
|
||||
send(client, line.string)
|
||||
send(client, wwwNL)
|
||||
elif not running(process): break
|
||||
|
||||
# --------------- Server Setup -----------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user