madhuneal / lusca-cache

Automatically exported from code.google.com/p/lusca-cache
0 stars 0 forks source link

Conditional requests w/ 304 responses hang #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Eg:

---
adrian@kandy:~$ telnet 192.168.1.10 3188
Trying 192.168.1.10...
Connected to 192.168.1.10.
Escape character is '^]'.
GET http://www.foxnews.com/js/adRelated.js?1245352800 HTTP/1.0
Host: www.foxnews.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11)
Gecko/2009060310 Ubuntu/8.10 (intrepid) Firefox/3.0.11
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Referer: http://www.foxnews.com/
Cookie: CP=null*; rsi_ct=2009_6_29:3
If-Modified-Since: Thu, 18 Jun 2009 19:20:00 GMT
If-None-Match: "228500-1cf3-46ca44b439800"
Cache-Control: max-age=259200
Connection: keep-alive

---

this hangs!

Original issue reported on code.google.com by adrian.c...@gmail.com on 29 Jun 2009 at 4:12

GoogleCodeExporter commented 9 years ago
The reply is being parsed and handled, but fwdComplete() isn't called until the
upstream socket times out. The http code thinks more data is coming and thus
schedules a read.

httpState->chunk_size is -1; httpState->eof is 0. Thus the complete flag set in
src/http.c (specifically line 886/887) never gets set.

Original comment by adrian.c...@gmail.com on 29 Jun 2009 at 4:13

GoogleCodeExporter commented 9 years ago
The root problem is that httpReplyBodySize() is behaving incorrectly. It skips 
all of
the status line checks and returns a size of -1.

This is most likely a hold-over from the method modifications done in 
Squid-2.HEAD.

Original comment by adrian.c...@gmail.com on 29 Jun 2009 at 4:15

GoogleCodeExporter commented 9 years ago
Fixed in r14103.

Original comment by adrian.c...@gmail.com on 29 Jun 2009 at 4:29