[web-devel] Parse HTTP headers

Björn Bringert bringert at cs.chalmers.se
Tue Apr 10 10:49:19 EDT 2007


Henning Thielemann wrote:
>  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.)

Sounds good. You are welcome to implement it :-) The HTTP library could 
do with a new maintainer by the way... What happened to the HTTP strike 
force?

/Björn


More information about the web-devel mailing list