24 Jan
2005
24 Jan
'05
15:27
On Monday 24 January 2005 12:21, christian zimmermann wrote: > christian zimmermann wrote: > > Torsten Foertsch wrote: > >> Richtiger wäre wahrscheinlich, mit RequestHeader die paar if-* > >> Header aus RFC 2616 (bei mir im RPM rfc-2004.10.5-1) zu löschen. Hast > >> Du das mal probiert? > >> > >> Torsten > > > > Ich werds gleich mal testen. > > Also ich habe mal versucht mittels > >> Order allow,deny > Allow from all > RequestHeader unset If-Modified-Since > > > > Diesen Header zu entfernen, aber scheinbar greift dieser erst gar nicht. > Es erscheint weiterhin dieser Header und in den Websrv. logs ein 304. > > Der syntax ist aber korrekt? oder irre ich mich Also, ich habe jetzt mal ein paar Experimente gemacht: 1. einfach ein File holen: > curl -v http://localhost/selfhtml/index.htm -o /dev/null -s * About to connect() to localhost port 80 * Connected to localhost (127.0.0.1) port 80 > GET /selfhtml/index.htm HTTP/1.1 User-Agent: curl/7.12.0 (i686-suse-linux) libcurl/7.12.0 OpenSSL/0.9.7d ipv6 zlib/1.2.1 Host: localhost Pragma: no-cache Accept: */* < HTTP/1.1 200 OK < Date: Mon, 24 Jan 2005 13:48:55 GMT < Server: Apache/2.0.52 (Linux/SUSE) < Last-Modified: Sat, 27 Oct 2001 08:00:00 GMT < ETag: "31a27-2662-744d6000" < Accept-Ranges: bytes < Content-Length: 9826 < Content-Type: text/html; charset=ISO-8859-1 * Connection #0 to host localhost left intact * Closing connection #0 Im Logfile erschien: 127.0.0.1 - - [24/Jan/2005:14:48:55 +0100] "GET /selfhtml/index.htm HTTP/1.1" 200 9826 "-" "curl/7.12.0 (i686-suse-linux) libcurl/7.12.0 OpenSSL/0.9.7d ipv6 zlib/1.2.1" 2. das Ganze mit If-Modified-Since Header: > curl -v http://localhost/selfhtml/index.htm -o /dev/null -s -H 'If-Modified-Since: Sat, 27 Oct 2001 08:00:00 GMT' * About to connect() to localhost port 80 * Connected to localhost (127.0.0.1) port 80 > GET /selfhtml/index.htm HTTP/1.1 User-Agent: curl/7.12.0 (i686-suse-linux) libcurl/7.12.0 OpenSSL/0.9.7d ipv6 zlib/1.2.1 Host: localhost Pragma: no-cache Accept: */* If-Modified-Since: Sat, 27 Oct 2001 08:00:00 GMT < HTTP/1.1 304 Not Modified < Date: Mon, 24 Jan 2005 13:51:31 GMT < Server: Apache/2.0.52 (Linux/SUSE) < ETag: "31a27-2662-744d6000" * Connection #0 to host localhost left intact * Closing connection #0 Wie erwartet status=304. Im Logfile erscheint: 127.0.0.1 - - [24/Jan/2005:14:51:31 +0100] "GET /selfhtml/index.htm HTTP/1.1" 304 - "-" "curl/7.12.0 (i686-suse-linux) libcurl/7.12.0 OpenSSL/0.9.7d ipv6 zlib/1.2.1" 3. Jetzt ergänze ich die httpd.conf um: RequestHeader unset If-Modified-Since und mach das nochmal: > curl -v http://localhost/selfhtml/index.htm -o /dev/null -s -H 'If-Modified-Since: Sat, 27 Oct 2001 08:00:00 GMT' * About to connect() to localhost port 80 * Connected to localhost (127.0.0.1) port 80 > GET /selfhtml/index.htm HTTP/1.1 User-Agent: curl/7.12.0 (i686-suse-linux) libcurl/7.12.0 OpenSSL/0.9.7d ipv6 zlib/1.2.1 Host: localhost Pragma: no-cache Accept: */* If-Modified-Since: Sat, 27 Oct 2001 08:00:00 GMT < HTTP/1.1 200 OK < Date: Mon, 24 Jan 2005 14:17:38 GMT < Server: Apache/2.0.52 (Linux/SUSE) < Last-Modified: Sat, 27 Oct 2001 08:00:00 GMT < ETag: "31a27-2662-744d6000" < Accept-Ranges: bytes < Content-Length: 9826 < Content-Type: text/html; charset=ISO-8859-1 * Connection #0 to host localhost left intact * Closing connection #0 Jetzt kommt Status 200. Im Logfile erscheint: 127.0.0.1 - - [24/Jan/2005:15:17:38 +0100] "GET /selfhtml/index.htm HTTP/1.1" 200 9826 "-" "curl/7.12.0 (i686-suse-linux) libcurl/7.12.0 OpenSSL/0.9.7d ipv6 zlib/1.2.1" D.h. RequestHeader unset Anweisung funktioniert. Folgendes passiert aber. Wenn ich die RequestHeader Anweisung in einen Location Block packe funktioniert es. Dann habe ich es noch mit einem Directory Block probiert in 2 Varianten. Bei mir ist /srv/www/htdocs/selfhtml ein symbolic Link auf /usr/share/doc/selfhtml. Schreibe ich also /srv/www/htdocs/selfhtml in den Directory Block funktioniert es weiterhin, mit /usr/share/doc/selfhtml aber nicht. Ist Dein /home/web/scripts/ vielleicht über einen Symlink in das DocumentRoot geraten? Torsten