http.header Home



Home | Http protocol | Coding references | Apache 1.3 | FAQ | About | Français


Frequently Asked Questions :

1 - What is the purpose of Http.Header ?
2 - Is Http the only protocol supported ?
3 - Why does "localhost" can't be connected ?
4 - How sould i use the "cookie" field ?



1 - What is the purpose of Http.Header ?

Http.header is a tool that shows the http headers sent by web servers.

In an http transaction, the two parts, requester and server, sends informations about who they are and the content they are requesting / sending. Theses informations are a few lines of text, happended after the request by a browser and before the html code by a web server. Theses headers aren't shown in the html code of a page since they are part of the Http protocole and not Html protocole.

Theses headers are usefull to get informations of a web server. Generaly, the operating system and the server soft name are included in theses headers. Moreover, the server can send a cookie or advise a proxy to cache a page !!

So you can use this script to get informations on a server, or to test a script of your own. For exemple, you could send a different page depending on the OS of the requester.


2 - Is Http the only protocol supported ?

Yes !
Http headers are interesting but others ??
It could be interesting to get some rtsp headers, someday maybe...


3 - Why does "localhost" can't be connected ?

"Localhost" is a server name such as "www.yahoo.com", traducted in an IP address by a DNS.
When you request for "localhost" on your PC, your operating system sends back the ip address of 127.0.0.1 which is a particular loop-back address. "Localhost" is generaly used to test your web server.
Used in Http.header, the script asks DNS for a server called "localhost" !! Unfortunatly, your IP address is not known by the DNS...

If you want to test the web server installed on your own PC, you need to enter your IP address.
To get your IP address, under Windows 9x, prompt for winipcfg at Ms-Dos console, and under Windows Nt / 2000, prompt for ipconfig at Ms-Dos console.


 

 
4 - How sould i use the "cookie" field ?

A cookie is a little piece of information sent by web server. This line of text is saved by your browser and sent back in every request to the server which sent the cookie.
With Http.header, you can send dummy cookies by entering the all value in the field 'cookie'.
Ex. : you want to simulate this cookie :

<META HTTP-EQUIV="Set-Cookie" CONTENT="variable=content;expires=Monday, 01-Jan-2001 00:00:00 GMT;path=/">
=> Please enter : variable=content;expires=Monday, 01-Jan-2001 00:00:00 GMT;path=/

Note : the date is generaly discarded, so you could enter :
variable=content;path=/



 

Matthieu Delgrange 2006 - http.header@netcourrier.com - Home