http header for getting stat data?

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
allasso
Forum Commoner
Posts: 28
Joined: Fri Nov 28, 2008 1:24 pm

http header for getting stat data?

Post by allasso »

Hello,

I would like to know what kind of header is sent (assuming this is the case) from the client to request stat data on a file that is on the http server being requested of. What is this header called, and what does it look like?

eg, when using wget with the -N option, it will check the mod time of the file on the server to decide whether to download the file or not.

Also, web browsers (as well as wget, curl, etc) retrieve this information as well to get the file size for progress reports during a download.

Thanks,

Allasso
david64
Forum Commoner
Posts: 53
Joined: Sat May 02, 2009 8:12 am
Location: Wales

Re: http header for getting stat data?

Post by david64 »

The request to get this page would look like:

Code: Select all

 
GET /viewtopic.php?f=14&t=99427 HTTP/1.1
 
Host: forums.devnetwork.net
 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008101315 Linux Mint/6 (Felicia) Firefox/3.0.3
 
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
 
Accept-Language: en-gb,en;q=0.5
 
Accept-Encoding: gzip,deflate
 
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
 
Keep-Alive: 300
 
Connection: keep-alive
 
 
The important bit is the top two lines.
allasso
Forum Commoner
Posts: 28
Joined: Fri Nov 28, 2008 1:24 pm

Re: http header for getting stat data?

Post by allasso »

thank you.
Post Reply