- From: Mark Nottingham <mnot@mnot.net>
- Date: Thu, 3 Apr 2003 19:50:59 -0800
- To: "Justin Chapweske" <justin@chapweske.com>, "S. Mike Dierken" <mdierken@hotmail.com>
- Cc: <www-talk@w3.org>
Hey Justin, Do you want to be able to talk about the logical components of the headers, rather than just as strings? If so, I'd love to chat. I wrote a library [1] yonks ago (about 1998) for parsing HTTP headers and exposing them as objects; e.g., an ETag would have a string "value" property and a boolean "weak" property. It's currently used in the cacheability engine, and is full of bugs. More recently, I've been rewriting it to expose headers as data structures (e.g., dictionaries, lists, strings, ints, as appropriate). This is somewhat more useable, but finding the right mapping for some headers is... challenging. I can send a copy if you'd like to see what it looks like. I've also taken a couple of stabs at doing this in RDF, but never got it to completeness (mostly because limitations in CWM would make it less than useful; e.g., I wanted to do a cwm_uri module for a long time, to be able to parse URIs into lists). E.g., see below (this is quite old and incomplete, but hopefully you get the idea). 1. http://www.mnot.net/python/httpheadertypes.py 2. http://www.mnot.net/cacheability/ <> http_request:uri [ # a rdf:Bag ; :value "http://www.example.com/pages/dyn/1.html?username=bob@session=132323 " ; :scheme "http" ; :host "www.example.com" ; :port "80" ; :path [ # a rdf:Seq ; :value "/pages/dyn/1.html" ; rdf:_1 "pages" ; rdf:_2 "dyn" ; rdf:_3 "1.html" ; ] ; :query [ # a rdf:Bag ; :value "username=bob&session=132323" ; :username "bob" ; :session "132323" ; ] ; ] . <> http_request:method "GET" . <> http_request:pragma [ # a rdf:Bag ; :no-cache "null" ; ] . <> http_request:user_agent "Mozilla/1.0 (blah, blah)" . <> http_request:cookie [ # a rdf:Bag ; :sessionID "2323113132" ; :name "bob" ; ] . <> http_request:authorization [ # a rdf:Bag ; :scheme "basic" ; :userid "bob" ; :password "bobspassword" ; ] . <> http_response:status "200" . <> http_response:cache_control [ # a rdf:Bag ; :max-age "600" ; :no-transform "1" ; ] . <> http_response:set_cookie [ # a rdf:Bag ; :sessionID [ # a rdf:Bag ; :value "132134" ; :expires "1002828066" ; :path "/" ; :domain "example.com" ; :secure "0" ; ] ; :name [ # a rdf:Bag ; :value "bob" ; ] ; ] . ----- Original Message ----- From: "Justin Chapweske" <justin@chapweske.com> To: "S. Mike Dierken" <mdierken@hotmail.com> Cc: <www-talk@w3.org> Sent: Wednesday, April 02, 2003 8:51 PM Subject: Re: RDF Description of HTTP headers/meta-data > > Thanks for the link, but I'm looking for something subtly different. > > XMTP is a format for serializing MIME into XML. > > I'm looking for an RDF syntax that makes statements about the metadata > of a URI, using HTTP headers as the source data. > > S. Mike Dierken wrote: > > A most excellent approach is documented here: > > http://www.openhealth.org/xmtp/ > > > > > > -- > Justin Chapweske, Onion Networks > http://onionnetworks.com/ >
Received on Thursday, 3 April 2003 22:51:19 UTC