Torben Brosten wrote:
Looking through modules/https.tcl ..
ns_httpsopen
er, I mean.. ns_httpspost
> depends on server's content-length header to be somewhat
accurate or greater than 0 if supplied.
In particular, won't this code break if a server's header returns
Content-length of 0?
set length [ns_set iget $headers content-length]
if [string match "" $length] {
set length -1
}
set err [catch {
#
# Read the content.
#
while 1 {
set buf [_ns_https_read $timeout $rfd $length]
append page $buf
if [string match "" $buf] {
break
}
if {$length > 0} {
incr length -[string length $buf]
if {$length <= 0} {
break
}
}
}
} errMsg]
iirc, AOLserver has a bug that returns inaccurate content-lengths,
sometimes 0.
Could this be a/the cause?
Torben
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.