PDA

View Full Version : http header



nishanthaMe
September 24th, 2007, 11:03 AM
I want send http head request to a file using a c programe.can anyone have an idea?

aks44
September 24th, 2007, 06:24 PM
0. open a client socket & connect to the server,
1. send a HEAD request according to RFC 1945 (HTTP 1.0) (http://www.faqs.org/rfcs/rfc1945.html) or RFC 2616 (HTTP 1.1) (http://www.faqs.org/rfcs/rfc2616.html) depending on what protocol version you plan to support (and what the server supports),
2. parse the answer to extract the info you need.

BTW you don't send a HEAD request to a file, but to a HTTP server...