Wednesday, August 12, 2009

Check Server HTTP Headers with Curl

SkyHi @ Wednesday, August 12, 2009

nikid@Januty:~$curl -I -L http://google.com
HTTP/1.1 301 Moved Permanently
Location: http://www.google.com/
Content-Type: text/html; charset=UTF-8
Date: Wed, 12 Aug 2009 23:48:52 GMT
Expires: Fri, 11 Sep 2009 23:48:52 GMT
Cache-Control: public, max-age=2592000
Server: gws
Content-Length: 219

HTTP/1.1 302 Found
Location: http://www.google.ca/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Set-Cookie: PREF=ID=35c7e1aa823c6cd8:TM=1250120932:LM=1250120932:S=gSDjFcacRvoiyuD5; expires=Fri, 12-Aug-2011 23:48:52 GMT; path=/; domain=.google.com
Date: Wed, 12 Aug 2009 23:48:52 GMT
Server: gws
Content-Length: 218

HTTP/1.1 200 OK
Date: Wed, 12 Aug 2009 23:48:52 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=890b602731f5045a:TM=1250120932:LM=1250120932:S=vJxFQBauIXCfKH91; expires=Fri, 12-Aug-2011 23:48:52 GMT; path=/; domain=.google.ca
Server: gws
Transfer-Encoding: chunked






nikid@Januty:~$curl -I -L http://google.com
HTTP/1.1 301 Moved Permanently
Location: http://www.google.com/
Content-Type: text/html; charset=UTF-8
Date: Wed, 12 Aug 2009 23:48:52 GMT
Expires: Fri, 11 Sep 2009 23:48:52 GMT
Cache-Control: public, max-age=2592000
Server: gws
Content-Length: 219

HTTP/1.1 302 Found
Location: http://www.google.ca/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Set-Cookie: PREF=ID=35c7e1aa823c6cd8:TM=1250120932:LM=1250120932:S=gSDjFcacRvoiyuD5; expires=Fri, 12-Aug-2011 23:48:52 GMT; path=/; domain=.google.com
Date: Wed, 12 Aug 2009 23:48:52 GMT
Server: gws
Content-Length: 218

HTTP/1.1 200 OK
Date: Wed, 12 Aug 2009 23:48:52 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=890b602731f5045a:TM=1250120932:LM=1250120932:S=vJxFQBauIXCfKH91; expires=Fri, 12-Aug-2011 23:48:52 GMT; path=/; domain=.google.ca
Server: gws
Transfer-Encoding: chunked