> Quoting Amos Jeffries : > >> [EMAIL PROTECTED] wrote: >> > Hi, >> > >> > >> > >> > I encounter An "invalid Response" on a particular site. >> > This is what I get from squid : >> > -------------------------- >> > The requested URL could not be retrieved >> > >> > While trying to process the request: >> > >> > GET >> > >> /nms/jsp/webForm.jsp?fo=bl&id=S7Nn7isL2GdroOkABgb1B35boKb4Z2SiMGMFGb/VEkJUIAIA >> > HTTP/1.1 >> > Host: somesite.com >> > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; >> rv:1.8.1.9) >> > Gecko/20071025 Firefox/2.0.0.9 >> > Accept: >> > >> > text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 >> > Accept-Language: en,en-us;q=0.7,fr-fr;q=0.3 >> > Accept-Encoding: gzip,deflate >> > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 >> > Keep-Alive: 300 >> > Proxy-Connection: keep-alive >> > Proxy-Authorization: Basic Y<snip>8= >> > -------------------------- >> > >> > relaxed_header_parser value is at "warning". >> > >> > I had a look at the headers, but couldn't find anything peculiar. But >> I'm >> not an >> > expert in this field. >> > Cache.log has said (I'm not 200% sure if it is related or not : >> > 2007/11/05 16:11:53| ctx: enter level 30: '!ê«@' >> > 2007/11/05 16:11:53| ctx: enter level 31: >> 'http://somesite.com/favicon.ico' >> > 2007/11/05 16:11:53| ctx: enter level 32: >> 'http://somesite.com/favicon.ico' >> > 2007/11/05 16:11:53| # ctx: suspiciously deep (32) nesting: >> > >> > With Log_mime_headers on , I have >> > 1194278039.445 135 10.7.85.46 TCP_MISS/502 1996 GET >> > http://somesite.com/nms/jsp/webForm.jsp? user-andrew >> DIRECT/213.139.xxx.xxx >> > text/html [Host: somesite.com\r\nUser-Agent: Mozilla/5.0 (Windows; >> U; >> Windows >> > NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9\r\nAccept: >> > >> > text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Language: >> > en,en-us;q=0.7,fr-fr;q=0.3\r\nAccept-Encoding: >> gzip,deflate\r\nAccept-Charset: >> > ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nKeep-Alive: 300\r\nProxy-Connection: >> > keep-alive\r\nProxy-Authorization: Basic YXsnipcm8=\r\nPragma: >> > no-cache\r\nCache-Control: no-cache\r\n] [HTTP/1.0 502 Bad >> Gateway\r\nServer: >> > squid\r\nDate: Mon, 05 Nov 2007 15:53:59 GMT\r\nContent-Type: >> > text/html\r\nContent-Length: 1740\r\nExpires: Mon, 05 Nov 2007 >> 15:53:59 >> > GMT\r\nX-Squid-Error: ERR_INVALID_RESP 0\r\n\r] >> > >> > Two tcpdumps, one from the squid server, another one from another >> internet >> > access point, show strange characters just between the headers and the >> html >> > stanza. See the "5ea" , then the "1" , and the "0". >> > But this is through Wireshark and I'm not sure about the exactness. >> >> Wireshark is exact to the bit. > > So the strange characters "5ea","1","0" *were* actually on the wire ?
Apparently. I've never seen a chunked response in wireshark. But the HTTP headers say chnked, and deflate. So I assume its a binary coding meta-data for the chunk. In this case it looks like a non-encoded chunk anyway. > -- > 5ea > <html> > <head> > <META http-equiv="Content-Type" content="text/html; charset=utf-8"> > snip > </body> > </html> > > 1 > > > 0 > > -- > > >> >> > >> > -------------------------- >> > GET >> /nms/jsp/webForm.jsp?fo=bl&id=S7Nn9L2GdroOkABgb1B35boKb4Z2SiMGMFGb/VEkJUIAIA >> > HTTP/1.1 >> > Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, >> > application/x-shockwave-flash, application/vnd.ms-excel, >> > application/vnd.ms-powerpoint, application/msword, */* >> > Accept-Language: fr >> > UA-CPU: x86 >> > Accept-Encoding: gzip, deflate >> > User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET >> CLR >> > 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727) >> > Host: somesite.com >> > Connection: Keep-Alive >> > >> > HTTP/1.1 200 OK >> > Date: Tue, 06 Nov 2007 04:42:03 GMT >> > Server: Apache/2.0.52 (Red Hat) >> > Transfer-Encoding: chunked >> >> For starters the server is broken and throwing object that squid can't >> handle back at squid. Chunked encoding must not be sent to a HTTP/1.0 >> client. > > I'm confused : Which HTTP/1.0 client ? I see GET HTTP/1.1 Yes. _Squid_ is the HTTP/1.0 client. Apache server is throwing the HTTP/1.1 data at it. aaahh, Fooo! Maybe a bug then, If squid is in the middle (I assume its transparent/intercepting?) it should at least be translating that 1.1 received (from real client) to a 1.0 that it can handle, and request 1.0 from Apache. Will definitely have to hand this to Henrik when he gets well again. > >> IIRC there was one aborted 2.6 release of squid that tried to cope, but >> that was reverted out from main due to problems. Henrik would know more >> on that. >> Check you are running a recent 2.6 stable. >> >> >> Amos >> > > I forgot to mention the version we're using : 2.6 Stable16. > Also, the directive "via" is set to "off". Amos