further steps to get rid of deprecated endOfFile and readLine
This commit is contained in:
parent
a489161b16
commit
e261a88d07
11 changed files with 35 additions and 21 deletions
|
|
@ -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 -----------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue