[users@httpd] Weird behaviour when updating error page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: Weird behaviour when updating error page

Hello all !


Here's the scenario :
I have an error page error.htm, currently associated with most error codes (such as 404, through httpd.conf and 'ErrorDocument').

There is also two pages, default.htm and maintenance.htm.

When I run a script (something like 'maintenance on'), I go on maintenance mode and overwrite error.htm with maintenance.htm ; and when turning maintenance mode off, I overwrite error.htm with the default error page, default.htm.

But when switching the page, for a few minutes (5 minutes or more) I still received the content of the old page but with the tags of the new one !!!!!!


here's an example which is easier to understand :

Let default.htm content be '12345678', 8 bytes wide.
Let maintenance.htm be 'abcde', 5 bytes wide.
Maintenance mode is off since yesterday, so error.htm content is '12345678'.
When I run into a 404 error (fetching anything.htm) I get :
- content : '12345678'
- http header : date-modified ~ 'yesterday' ; content-length is '8'.

Now I go on maintenance mode (nothing else but a copy : cp maintenance.htm $target/error.htm). On my filesystem, error.htm is updated as expected ('abcde', 5 bytes wide, modified 'today').

I run into another 404 error (fetching anything2.htm) : now, I receive :
- http header : date-modified 'today' (fine), content-length '5' (nice too).
- content : '12345' !!!!!! old file content, but 'new format' in some way (length of the new format).
After a while, I get the new error page content. No caching anywhere !!! I've checked the logs and so on, and there is nothing special.

Of course, in the other way there is a problem :
5 bytes --> 8 bytes
'abcde' --> '12345678'
Try the 'rule' I suggested : new size is 8 bytes, but I must use old file content which is only 5 bytes-wide... so how can Apache do ? Well, in this case, the TCP connection is closed without any answer !!! This seems to confirm the explained behaviour.


So why Apache does not use the new file content, though he could realize the file has changed ? This looks like a bug, but maybe you'll find something wrong on my side ?


Apache is 2.0.47 (and can't be updated quickly, production system).

Thanks a lot !

[I'm pretty sure the problem does not come from caching at any stage (but Apache ?), and I have analyzed the frames with Ethereal to confirm everything I explained]

 
Mathieu VB, Belgium.

________
Disclaimer: This e-mail is intended for the exclusive use by the person(s)
 mentioned as recipient(s). 
This e-mail and its attachments, if any, contain confidential information 
and/or information protected by intellectual property rights or other rights.
This e-mail does not constitute any commitment for ING or its subsidiaries 
except when expressly otherwise agreed in a written agreement between the 
intended recipient and the originating subsidiaries of ING, sender of the mail.
If you receive this message by mistake, please, notify the sender with the 
"reply" option and delete immediately this e-mail from your system, and 
destroy all copies of it.
You may not, directly or indirectly, use, disclose, distribute, print or copy,
 this e-mail or any part of it if you are not the intended recipient.
You have to take at any time all necessary measures against viruses.
--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux