tag:blogger.com,1999:blog-14248564.post112126286504731508..comments2016-03-25T20:25:45.398+08:00Comments on cwho.blog: Almost done with HTTPcwhohttp://www.blogger.com/profile/15561001000880526194noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-14248564.post-1121318891322524822005-07-14T13:28:00.000+08:002005-07-14T13:28:00.000+08:00That was what I had thought initially, but I searc...That was what I had thought initially, but I searched the internet (googling was very tedious since "HTTP" matched everything possible), and it seemed to indicate that Content-Encoding applies before ranges are specified. Two below:<BR/><BR/>http://www.and.org/texts/server-http<BR/>Under "Range and Accept-Encoding headers": The Range specifies a content range within the encoded entity. <BR/><BR/>http://www.squid-cache.org/mail-archive/squid-dev/200308/0145.html<BR/><BR/><BR/>One way to get around the problem would be to modify the Etag header to include the gzip identifier (does this make sense). e.g. Etag = gzip-<> vs Etag = <>, ensuring that the client will not mix/match zipped and unzipped content.<BR/><BR/>Another issue raised in all the internet searching was that most servers enable gzipping only for specific types of files (text) since the zip format + range can break some application data streams. Will add a configuration item for it.cwhohttps://www.blogger.com/profile/15561001000880526194noreply@blogger.comtag:blogger.com,1999:blog-14248564.post-1121316415569748502005-07-14T12:46:00.000+08:002005-07-14T12:46:00.000+08:00It wouldn't make sense if the Range headers applie...It wouldn't make sense if the Range headers applied to the gzipped content. Since it's optional for the server to gzip the content (the client merely indicates that it is capable of receiving gzip with the Accept header), the client may or may not receive a gzipped response. So if the Range header applied to the gzipped content, you'd get two different ranges depending on what the server decided to do, and that would make sense.<BR/><BR/>Gzipping is just an *encoding* -- that is, it's applied to the body, but doesn't effect the content of the "real" body, just the bytes that are sent across the wire. So any headers that apply to the real body (like Range) apply before gzipping.<BR/><BR/>Well... at least, I think so. Some things like Content-Length seem like they should apply after gzipping. The HTTP/1.1 spec doesn't really seem to offer any answers either. Maybe Apache's mod_gzip would indicate some of how this should work.Ian Bickinghttps://www.blogger.com/profile/10921115783730718101noreply@blogger.com