FOAF URI in HTTP headers - easy

Brian (? need FOAF!) picked up on my earlier musing about FOAF cookies with the idea of putting your FOAF profile's URI in a HTTP header. Architecturally neat, but I had reservations about implementation, until I saw the following in Brian's post FOAF Based Marketing. After outlining FOAF data to show an interest in beer and technology (copy and paste) he continues:

Now that we have some FOAF data, how do we let the server know about its location? Enter the Firefox modifyheaders extension. This lets you modify the sent HTTP headers, adding pretty much anything you like:

modify headers

Here I'm simply setting a new header called "FOAF" with the value of the FOAF URI. Simple!

Someone please jump on this right away. I'm sick of looking at ads to find lost classmates and get my home refinanced.

PS. I did a quick check to see if this would be valid, couldn't remember offhand. The experimental "An HTTP Extension Framework" RFC 2774 didn't like it, to conform to that the extension name would have to be be defined in another RFC or be a URI ( http://xmlns.com/foaf/0.1/ I guess). But presumably HTTP 1.1 ( RFC 2616) would be the important spec, and I couldn't see a problem there.

PPS. My FireFox install is a bit flaky, the extension doesn't appear to be working. But I've whipped up a quick test script - if you have a FOAF header than this should display it: FOAF Header Test (source: foafheader.php.txt).

I tested the test with:



wget --header="FOAF: http://dannyayers.com/misc/foaf/foaf.rdf" -q -O - http://pragmatron.org/foafheader.php

Bleah, I asked around and apparently I should either use "X-FOAF" or apply to get "FOAF" registered as a header name. I dunno, seems a bit counter-productive to require registration for things like this - something involving a URI should do (note the compromise in Atom for link rel values - IANA registered name or URI). Reminds me of the anti-piracy stuff, no effect on people that don't care about breaking the conventions but a hassle for folks who try to do the right thing.

So being a standards junky but busy (and with a non-conformist soul), I'll stick with "FOAF:" and do the registration application when I've got a minute.

~

Just posted over at Brian's:

The only thing is the standards bit - the choices seem to be:

1. use "FOAF: http://example.org/foaf.rdf"

- pursue IETF/IANA registration for it

2. use "X-FOAF: http://example.org/foaf.rdf"

- I've not found confirmation, but people seem to think it's ok without registration

3. use (something like) "Profile: http://example.org/foaf.rdf"

- it's not tied to a particular data type it might be more appropriate

4. use "Link: <http://example.org/foaf.rdf>; rel="foaf"

- suggested by Mark Nottingham (editor/author of some of the related specs) - it was in RFC 2068, but isn't in 2616, so should be acceptable standards-wise, has the advantage of mapping 1:1 with HTML link tag

Any preference?

(I'd be willing to do/help with the paperwork if registration was needed)

[Danny]

Danny Ayers
2005-08-28T10:50:32Z

Related
Comments
Edit