Hello Nick,
Thanks for your comment.
I have already added the report in Apache bugzilla a few weeks ago.
It is #38070.
So far, nobody pick it up.

The problem happened a little bit more complicate config.
PC(Browser) => Apache1 (CGI) => Apache2 (Content server).

The CGI do forward the "if-modified-since" to the backend Apache2.
Then Apache2 returns Last-Modified to Apache1.
Most of the time, it worked correct.  One exception that I found
was, when I modify file's time stamp on Apache2 to past time,
(to simulate file backup case), then Apache1 log and packet started
to mismatched.

(1) Clear Browser's cache

(2) Access to a page.
PC =>           Apache1 =>              Apache2    Year 2005 file
PC <=(200+BODY) Apache1 <==(200+BODY)=  Apache2
  (Last-M 2005)   200     (Last-M 2005)   200

(3) Modify file's time stamp on Apache2 to 2004

(4) Without clear browser's cache, access one more time.
PC =>(If-M-S 2005) Apache1 ==>(IF-M-S 2005) Apache2    Year 2004 file
PC <=(200+No BODY) Apache1 <==(200+BODY)=   Apache2
                     304     (Last-M 2004)   200

(5) Access to the page again.
PC =>              Apache1 ==>             Apache2    Year 2004 file
PC <=(200+BODY)    Apache1 <==(200+BODY)=  Apache2
  (Last-M 2004)      200     (Last-M 2004)   200

(6) access again.
Same as step 4

(7) access again
Same as step 5

The sample script that I mentioned try to duplicate a problem
which happened in STEP4, especially a packet between Apache1 and PC.
At the same time, as you notice, the Apache1 in step4 logged 304.
I don't understand how come Apache1 think it 304 instead of 200.

This is a background why I wanted to confirm if Apache allow to
overwrite packet status... bug or feature??

Regards,
Masanari


On 1/15/06, Nick Kew <[EMAIL PROTECTED]> wrote:
> On Saturday 14 January 2006 18:04, Masanari Iida wrote:
> > Hi,
> >
> > I would like to ask the list members if following are
> > bug or feature of apache.
> >
> > Use following sample script,
> > Apache version: ANY  (1.3, 2.0 and 2.2)
> >
> > #!/bin/sh
> > cat <<EOT
> > Status: 200 OK
> > Last-Modified: Tue, 15 Feb 2005 15:00:00 GMT
> > Content-Type: text/html
> >
> > Hello world
> > EOT
>
> Interesting.  I can confirm that your CGI script with an If-Modified-Since
> header later than the Last-Modified date supplied by the script does
> indeed return 200 with no body.  That's broken, but is it Apache or
> the script that's at fault[1]?
>
> RFC2616 says of If-Modified-Since:
>
>       c) If the variant has not been modified since a valid If-^M
>          Modified-Since date, the server SHOULD return a 304 (Not^M
>          Modified) response.^M
>
> That makes sense: the script is stupid but technically within its rights
> to send the 200 unconditionally.  So Apache should presumably
> accommodate it by ignoring the If-Modified-Since header and
> returning 200 with the full body.
>
> If that's not already in bugzilla, you might consider entering it there.
>
> [1] It's both, of course.
>
> --
> Nick Kew
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>    "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to