Strange Bug with compression=1

Alan Hodgson ahodgson at simkin.ca
Thu Nov 4 15:41:53 UTC 2004


On Thu, Nov 04, 2004 at 01:07:39AM -0500, Chris Davies wrote:
> Can someone point us in the direction of where this is set?  Based on
> the patch dates, it appears that we are running the latest 2.4 patch,
> but, I thought I had seen a bug report somewhere that dealt with this in
> the 2.6 patchset.

I had to fix this in an RHEL kernel recently, it's in the following bit of
code:

       /*
        * Content-Length:
        */
       if (!req->lookup_dir) {
               if (tux_noid)
                       COPY_STATIC_PART(3BX, curr);
               else
                       COPY_STATIC_PART(3BY, curr);

               if (partial)
                       curr += sprintf(curr, "%Ld", req->output_len);
               else {
+                       if (req->content_gzipped)
+                               curr += sprintf(curr, "%Ld", req->total_file_len);
+                       else {
                               memcpy(curr, &req->etag, req->lendigits);
                               curr += req->lendigits;
+                       }
               }
               if (tux_generate_etags && (req->status != 404))


-- 
"Windows XP is the most reliable Windows ever.  To me, this is like saying
that asparagus is ``the most articulate vegetable ever.'' But still, I am
tempted." - Dave Barry




More information about the tux-list mailing list