Closed GoogleCodeExporter closed 9 years ago
Added your mods. Thanks. What a bizarre thing for chrome to do ...
Original comment by firstros...@gmail.com
on 30 Apr 2011 at 1:35
Original comment by mcc...@gmail.com
on 30 Apr 2011 at 2:25
A line is missing from the patch..
# Some browsers apparently don't like 404 pages
# which are too small ... what bizarre behaviour!
# http://code.google.com/p/wub/issues/detail?id=34
if {[string length [dict get $rsp -content]] < 512} {
dict append rsp -content "\n<!--[string repeat " " [expr {512 - $content_length}]] \n-->"
}
The variable content_length never gets set
Original comment by tircnf
on 30 Apr 2011 at 1:37
content length gets set elsewhere.
Original comment by mcc...@gmail.com
on 30 Apr 2011 at 1:54
I think I tricked you guys with my suggested patch :)
I created a local variable content_length so I wouldn't have to calculate the
length twice, and used that local variable for both the length check and the
expression to figure out how many spaces to add.
anyway... if you try and access something in the file domain that doesn't
exist, wub responds with
Server Error: can't read "content_length": no such variable
can't read "content_length": no such variable
Error Code 'TCL READ VARNAME'
can't read "content_length": no such variable
while executing
"expr {512 - $content_length}"
(procedure "::Http::NotFound" line 17)
invoked from within ....
If you want to check, you can take a clean checkout from svn..
create a docroot/html/
and try and access
http://localhost:8080/html/foo.html
you should get the 404, but you get an error about the missing variable
"content_length'.
Thanks for the rapid response.
Original comment by tircnf
on 30 Apr 2011 at 2:08
Sorry, you're right - checked in properly this time.
Original comment by mcc...@gmail.com
on 30 Apr 2011 at 2:45
Original issue reported on code.google.com by
tircnf
on 29 Apr 2011 at 7:04