View Single Post
Old 05-24-2013, 07:26 PM   #429
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 726
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
Quote:
Originally Posted by vlad59 View Post
Can you explain why it can't work ? These headers are only interpreted by your browser so the webserver should not interfere with them.
Good question! It made me rethink my statement that as far a I know "this code cannot work in Apache". I am certainly no Apache expert, but I try to search for solutions to problems and learn from them (the solutions and the problems).

It was my understanding that for the "header command" to work in Apache the module mod_headers.c should be loaded. Just like for x-sendfile and rewrite (now no longer needen for COPS to work perfectly). For these commands to work in Apache the corresponding modules (mod_xsendfile.c and mod_rewrite.c) should be loaded and active. In my version of Apache for Windows (WAMP) mod_headers.c was not enabled. Hence my statement that "this code cannot work in Apache". I omitted to add "unless you enable mod_headers.c.

Since then I found (about) the same code vlad59 used in fetch.php. There was no mention of the need to enable mod_headers.c. So I may be wrong in assuming the module needed to be loaded for it to work in Apache.

I just completed a little testing.
My browser Firefox (21.0) under OSX caches the covers. there is no significant CPU activity except the first time when covers are converted to thumbnails.
It does not seem to matter if mod_header.c is loaded or not.
Caching by firefox is what I expect to happen. To know if the headers code of COPS works I will have to test over time. I will keep an eye on it.

However I distinctly remember that when I tested on a slower Windows 7 PC with less memory I saw a lot (100%) of cpu activity every time I "revisited" a library after I used an other library. Mod_headers.c was not loaded then.
I do not see this behavior now with the faster PC and a new installation of WAMP and COPS.

@vlad59: can you follow my reasoning?

[A possible explanation is that the Apache installation of WAMP on my old PC has become "corrupted" as a result of a bit to much experimenting over time. One or two other things do not seem to work as I expect them to.]
mariosipad is offline   Reply With Quote