H
hoyhoy
I've been trying to figure out how to retrieve a http head request
date using http-access2.
I thought this could work:
h = HTTPAccess2::Client.new()
res = h.head('http://involution.com')
print response.header['date'],"\n"
However, that seems to be returning Time.now. Any suggestions?
FYI, you can view a http request by doing the following:
telnet involution.com 80
Trying 69.58.21.60...
Connected to involution.com.
Escape character is '^]'.
HEAD / HTTP/1.0
HTTP/1.1 200 OK
-----> Date: Tue, 28 Mar 2006 23:01:47 GMT <------- Date Header ----X
Server: Apache/2.0.52 (Red Hat)
Cache-Control: no-cache
Set-Cookie: _session_id=670e36e364a03785011afbfafbc15fde; path=/
Connection: close
Content-Type: text/html; charset=UTF-8
I'm looking at trying to find a way to see what time the server thinks
it is to do some time zone correction foo.
Regards,
Tony
http://involution.com
date using http-access2.
I thought this could work:
h = HTTPAccess2::Client.new()
res = h.head('http://involution.com')
print response.header['date'],"\n"
However, that seems to be returning Time.now. Any suggestions?
FYI, you can view a http request by doing the following:
telnet involution.com 80
Trying 69.58.21.60...
Connected to involution.com.
Escape character is '^]'.
HEAD / HTTP/1.0
HTTP/1.1 200 OK
-----> Date: Tue, 28 Mar 2006 23:01:47 GMT <------- Date Header ----X
Server: Apache/2.0.52 (Red Hat)
Cache-Control: no-cache
Set-Cookie: _session_id=670e36e364a03785011afbfafbc15fde; path=/
Connection: close
Content-Type: text/html; charset=UTF-8
I'm looking at trying to find a way to see what time the server thinks
it is to do some time zone correction foo.
Regards,
Tony
http://involution.com