Raihan Jamal wrote: but it doesn't have anything like ..
Raihan Jamal wrote:@Paul Clapham, Problem is that I am not sure how many content-types are there.
Paul Clapham wrote:Each URL has only one Content-Type header
Output
Parsing URL:- http://www.google.com with Content Type -> text/html; charset=ISO-8859-1
Response Headers size -> 9
Ignoring this key -> null=[HTTP/1.1 200 OK] with the content type -> text/html; charset=ISO-8859-1
Ignoring this key -> Date=[Mon, 11 Jul 2011 20:48:18 GMT] with the content type -> text/html; charset=ISO-8859-1
Ignoring this key -> Transfer-Encoding=[chunked] with the content type -> text/html; charset=ISO-8859-1
Ignoring this key -> Expires=[-1] with the content type -> text/html; charset=ISO-8859-1
Ignoring this key -> X-XSS-Protection=[1; mode=block] with the content type -> text/html; charset=ISO-8859-1
Ignoring this key -> Set-Cookie=[NID=48=WZhw08BQCg5h6jG63nibf5OJOba7oyVX763gZhjk7UHyGYjNMBOvLlNPl8Ov9FrcEjJJmaALYULZJmWhevIyqc4fhuB6fzuNKEqeSSpcKBvfX5wtZplSBWjQVN4KSLhn; expires=Tue, 10-Jan-2012 20:48:18 GMT; path=/; domain=.google.co.in; HttpOnly, PREF=ID=ce54dac9716f500a:FF=0:TM=1310417298:LM=1310417298:S=95wD8CclVxFdztxR; expires=Wed, 10-Jul-2013 20:48:18 GMT; path=/; domain=.google.co.in] with the content type -> text/html; charset=ISO-8859-1
Printing in if -> Content-Type=[text/html; charset=ISO-8859-1]
Ignoring this key -> Server=[gws] with the content type -> text/html; charset=ISO-8859-1
Ignoring this key -> Cache-Control=[private, max-age=0] with the content type -> text/html; charset=ISO-8859-1
Parsing URL:- http://java.sun.com/index.html with Content Type -> text/html
Response Headers size -> 6
Ignoring this key -> null=[HTTP/1.1 200 OK] with the content type -> text/html
Ignoring this key -> Date=[Mon, 11 Jul 2011 20:48:22 GMT] with the content type -> text/html
Ignoring this key -> Transfer-Encoding=[chunked] with the content type -> text/html
Printing in if -> Content-Type=[text/html]
Ignoring this key -> Connection=[Transfer-Encoding, keep-alive] with the content type -> text/html
Ignoring this key -> Server=[Oracle-Application-Server-11g Oracle-Web-Cache-11g/11.1.1.2.0 (TH;max-age=300+0;age=145;ecid=184747478908160597,0)] with the content type -> text/html
Parsing URL:- https://coderanch.com/forums with Content Type -> text/html;charset=UTF-8
Response Headers size -> 9
Ignoring this key -> null=[HTTP/1.1 200 OK] with the content type -> text/html;charset=UTF-8
Ignoring this key -> Date=[Mon, 11 Jul 2011 20:48:25 GMT] with the content type -> text/html;charset=UTF-8
Ignoring this key -> Vary=[Accept-Encoding] with the content type -> text/html;charset=UTF-8
Ignoring this key -> Content-Length=[12055] with the content type -> text/html;charset=UTF-8
Ignoring this key -> Keep-Alive=[timeout=60, max=100] with the content type -> text/html;charset=UTF-8
Ignoring this key -> Set-Cookie=[JSESSIONID=B236BD20FC74B2D4378E9CC35D025A9F; Path=/] with the content type -> text/html;charset=UTF-8
Printing in if -> Content-Type=[text/html;charset=UTF-8]
Ignoring this key -> Connection=[Keep-Alive] with the content type -> text/html;charset=UTF-8
Ignoring this key -> Server=[Apache-Coyote/1.1] with the content type -> text/html;charset=UTF-8
Parsing URL:- http://www.youtube.com with Content Type -> text/html; charset=utf-8
Response Headers size -> 10
Ignoring this key -> null=[HTTP/1.1 200 OK] with the content type -> text/html; charset=utf-8
Ignoring this key -> X-Frame-Options=[SAMEORIGIN] with the content type -> text/html; charset=utf-8
Ignoring this key -> Date=[Mon, 11 Jul 2011 20:48:27 GMT] with the content type -> text/html; charset=utf-8
Ignoring this key -> Transfer-Encoding=[chunked] with the content type -> text/html; charset=utf-8
Ignoring this key -> Expires=[Tue, 27 Apr 1971 19:44:06 EST] with the content type -> text/html; charset=utf-8
Ignoring this key -> Set-Cookie=[GEO=9c8ba04d05dd1342cd45ad5ba46aa636cwsAAAAzSU4OYzMzThthmw==; path=/; domain=.youtube.com, VISITOR_INFO1_LIVE=-AqgGmOp620; path=/; domain=.youtube.com; expires=Wed, 07-Mar-2012 20:48:27 GMT, use_hitbox=72c46ff6cbcdb7c5585c36411b6b334edAEAAAAw; path=/; domain=.youtube.com] with the content type -> text/html; charset=utf-8
Printing in if -> Content-Type=[text/html; charset=utf-8]
Ignoring this key -> Server=[Apache] with the content type -> text/html; charset=utf-8
Ignoring this key -> X-Content-Type-Options=[nosniff] with the content type -> text/html; charset=utf-8
Ignoring this key -> Cache-Control=[no-cache] with the content type -> text/html; charset=utf-8
John Jai wrote:
Paul Clapham wrote:Each URL has only one Content-Type header
Yes paul - i tried printing and each one had only one content - type
Raihan Jamal wrote: Problem is that I am not sure how many content-types are there
Pat Farrell wrote:
Raihan Jamal wrote: Problem is that I am not sure how many content-types are there
You can never list all of the content types. They are added all the time, and you can't ever know the complete list.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |