The Un-Official Proxomitron Forum
Content-Length header problem - Printable Version

+- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums)
+-- Forum: Proxomitron Config Sets (/forumdisplay.php?fid=43)
+--- Forum: Sidki (/forumdisplay.php?fid=44)
+--- Thread: Content-Length header problem (/showthread.php?tid=1868)



Content-Length header problem - sh8an - Dec. 21, 2011 04:45 AM

Hi all,

Have a strange issue here.
First the normal setup.
Browser->Handycache->Proxo->Net
If some image is opened the Content-Length header is transferred from Proxo as the last one in the headers block and Handycache for some reason doesn't see it. If I click the Bypass All button in Proxo then everything is OK, the Content-Length header is in the middle of the block and Handycache works with it fine.
Browser->Fiddler->Handycache->Proxo->Net
Fiddler interprets the same header block OK
How do i make it not the last one with Proxo? Maybe add some made up header?
Thanks in advance.

ps
the link used for checking - http://i31.fastpic.ru/big/2011/1220/ce/f69ac8135ff57c985fdb1960eda330ce.jpg


Update
After a bit of investigation noticed that this happens with jpg and png images and not with gifs. some header info below
Proxo headers
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 21 Dec 2011 15:50:29 GMT
Content-Type: image/jpeg; PrxMsg: Filter Image
Content-Length: 91656
Last-Modified: Tue, 20 Dec 2011 09:24:39 GMT
Connection: keep-alive
Accept-Ranges: bytes
Cache-Control: no-store, no-cache, max-age=0
Pragma: no-cache
|.*.URL-ID: (252) http://i29.fastpic.ru/big/2011/1220/87/d6900e54e897482f5ef88a97bd999e87.jpg

Handycache headers
21.12.11 20:50:24,014 # 1927 <<< URL: http://i29.fastpic.ru/big/2011/1220/87/d6900e54e897482f5ef88a97bd999e87.jpg
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 21 Dec 2011 15:50:29 GMT
Content-Type: image/jpeg; PrxMsg: Filter Image
Last-Modified: Wed, 21 Dec 2011 15:50:23 GMT
Accept-Ranges: bytes
Cache-Control: no-store, no-cache, max-age=0
Pragma: no-cache
|.*.URL-ID: (252) http://i29.fastpic.ru/big/2011/1220/87/d6900e54e897482f5ef88a97bd999e87.jpg
Transfer-Encoding: chunked
Connection: keep-alive

Fiddler headers
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 21 Dec 2011 15:50:29 GMT
Content-Type: image/jpeg; PrxMsg: Filter Image
Last-Modified: Wed, 21 Dec 2011 15:50:23 GMT
Accept-Ranges: bytes
Cache-Control: no-store, no-cache, max-age=0
Pragma: no-cache
|.*.URL-ID: (252) http://i29.fastpic.ru/big/2011/1220/87/d6900e54e897482f5ef88a97bd999e87.jpg
Connection: keep-alive
Content-Length: 91656

So Connection and Content-Length seem to be reordered
Took out HandyCache so chain is Fiddler->Proxo and here are the headers from Fiddler
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 21 Dec 2011 16:08:09 GMT
Content-Type: image/jpeg; PrxMsg: Filter Image
Last-Modified: Tue, 20 Dec 2011 09:24:39 GMT
Accept-Ranges: bytes
Cache-Control: no-store, no-cache, max-age=0
Pragma: no-cache
|.*.URL-ID: (304) http://i29.fastpic.ru/big/2011/1220/87/d6900e54e897482f5ef88a97bd999e87.jpg
Content-Length: 91656

So it is definitely Proxo changing the order. Can anyone share an insight on reordering the headers please?


RE: Content-Length header problem - JJoe - Dec. 21, 2011 07:20 PM

Try disable any filtering of images.

Assuming that you are using sidki's set, what happens after you disable Content-Type: 5b Filter sel. Image Types ?

HTH


RE: Content-Length header problem - sh8an - Dec. 22, 2011 11:16 AM

on the spot! after disabling a.m. filter the order is no longer changed.
do i need to keep it on? what does it do?
what's more interesting is why the order of the other header is changed
and yes cfg is sidki-2010-10-23


RE: Content-Length header problem - JJoe - Dec. 22, 2011 07:26 PM

(Dec. 22, 2011 11:16 AM)sh8an Wrote:  what does it do?

Unfortunately, some files that claim to be just images aren't. By default the Proxomitron does not filter images. This filter forces filtering.

(Dec. 22, 2011 11:16 AM)sh8an Wrote:  do i need to keep it on?

Your choice. Does your browser refuse to automatically open incorrectly typed image files? Do you need the browser to see the remote server's headers?



I think (Working from memory and your post. IOW, reader beware and confirm!):

The "content-length" header is removed by the Proxomitron. The correct "content-length" is unknown. The Proxomitron doesn't keep a running byte count of the filtering results.

The "Transfer-Encoding: chunked" header is added by the Proxomitron.

Handycache, being a caching proxy, is adding the "content-length" header.

HTH


RE: Content-Length header problem - sh8an - Dec. 23, 2011 04:36 AM

thanks. decided to keep it on with just adding a_type_i to problematic sites.


RE: Content-Length header problem - JJoe - Dec. 23, 2011 04:45 AM

(Dec. 23, 2011 04:36 AM)sh8an Wrote:  thanks. decided to keep it on with just adding a_type_i to problematic sites.

What problem does it cause?