Page 1 of 1

http header for getting stat data?

Posted: Thu Apr 30, 2009 7:32 am
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

Re: http header for getting stat data?

Posted: Wed May 06, 2009 4:06 pm
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.

Re: http header for getting stat data?

Posted: Sun May 10, 2009 8:19 am
by allasso
thank you.