[web-devel] Parse HTTP headers

Henning Thielemann lemming at henning-thielemann.de
Thu Apr 5 11:23:53 EDT 2007


 First of all, I want to say that I like Network.HTTP.HeaderName being an
enumeration like type because of the advantages that are listed in the
HTTP module. HeaderName has a Show instance which shows the header name as
the HTTP protocoll requires that. I don't find it good, since I like to
copy output values in GHCi back to the GHCi prompt. I'm missing a Read
instance or a parsing routine to convert String -> HeaderName.
 I want to do the following: I download HTML pages from the web which may
contain META-HTTP-EQUIV tags. I want to merge the HTTP header, that I got
from the web server, with the META information of the downloaded HTML
page. I like to merge them in terms of HTTP.Header, not in terms of
(String,String) and I also like to have a function like HTTP.findHeader to
extract some information from this list. (Currently I'm mainly interested
in Content-Type and Content-Language.)


More information about the web-devel mailing list