Re: Code updates

Miles Elam <[email protected]>
Newsgroups gmane.network.tux
Message-ID <[email protected]>
Thanks for testing that Mark.  I really appreciate it.  Here's the new 
updated diff of net/tux/proto_http.c with the "Vary" header: a very 
simple change.  I don't have access to a proxy server like squid, so 
will someone give this a test?  It works for me, so you can be pretty 
sure that it won't crash your machine outright.  Well...Let me rephrase 
that lest someone miscontrues that as a written promise and sues me.  I 
make no guarantees.  But if it crashes, I will be more surprised than 
you, and you can always get back to stable by turning off compression 
support.  :)

- Miles

---------------------------------------------------

1854c1854
< #define HEADER_PART3A "\r\nContent-Encoding: gzip"
---
 > #define HEADER_PART3A "\r\nVary: Accept-Encoding\r\nContent-Encoding: 
gzip"
1961,1963c1961,1973
<             // "%d" req->total_file_len
<             memcpy(curr, &req->etag, req->lendigits);
<             curr += req->lendigits;
---
 >             /* The ETag was generated with an uncompressed file's
 >              *  info.  I've left the ETag as it is, but the size
 >              *  needs to be from req->total_file_len.  In other
 >              *  words, needs to be from the compressed image if
 >              *  we're sending gzip versions.
 >              *  - [email protected] -- 2002-11-13
 >              */
 >             if (req->content_gzipped)
 >                 curr += sprintf(curr, "%Ld", req->total_file_len);
 >             else {
 >                 memcpy(curr, &req->etag, req->lendigits);
 >                 curr += req->lendigits;
 >             }

--------------------------------------------

Mark Swanson wrote:

>Perhaps all we need to do is modify the patch to also send back the header:
> "Vary: Accept-Encoding"
>
>http://lists.over.net/pipermail/mod_gzip/2002-September/006474.html
>
>Thoughts?
>
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.