Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: mod_headers doesnt work? |
|
Author |
|
birkettm
Joined: 27 Apr 2006 Posts: 20
|
Posted: Tue 01 Dec '09 12:09 Post subject: mod_headers doesnt work? |
|
|
Hi everyone. I am really stumped now. I have a virtual host where i want to add the the headers to be passed to IE but it just doesnt work and i am stumped. I have mod_headers loaded and tried to add a header using various formats of RequestHeader to no avail. Any suggestions?
LoadModule headers_module modules/mod_headers.so
RequestHeader add "Test Header":"test"
RequestHeader add "Test Header" "test"
RequestHeader set "Test Header":"test"
RequestHeader set "Test Header" "test"
And here are the headers for the page...
GET / HTTP/1.1
Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, */*
Accept-Language: en-gb
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Accept-Encoding: gzip, deflate
If-Modified-Since: Sat, 20 Nov 2004 15:16:26 GMT
If-None-Match: "100000000c5c8-2c-3e9521b600680"
Host: localhost
Connection: Keep-Alive
Stumped! Help! |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7355 Location: Germany, Next to Hamburg
|
Posted: Tue 01 Dec '09 15:17 Post subject: |
|
|
The headers you posted below are from your browser, not apache.
to test your header you can use telnet
Code: |
telnet 127.0.0.1 80
|
bad that you can't see what you type in after telnet 127.0.0.1 so you have to type blind. After each row press ENTER button. After the last one two times ENTER button.
Code: |
telnet 127.0.0.1 80
GET / HTTP/1.1
Host: localhost
|
Or use netcat, than you can see what you type. |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Tue 01 Dec '09 16:01 Post subject: |
|
|
Request headers using the RequestHeader directive are added by Apache to the request from IE to the Apache server just before Apache processes the request. IE won't ever see these headers, and you won't see them in a network trace.
Maybe you meant Response headers which are sent using the Header directive. These are added to the response from Apache to IE after the request is processed.
In either case, there is no colon between the header name and the value.
-tom- |
|
Back to top |
|
|
|
|
|
|