further steps to get rid of deprecated endOfFile and readLine

This commit is contained in:
Araq
2011-11-29 01:24:58 +01:00
parent a489161b16
commit e261a88d07
11 changed files with 35 additions and 21 deletions

View File

@@ -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 -----------------------------------------------