ISSUE-193

HTML served to browser even when RDF is explicitely requested in the Accept header

State:
RAISED
Product:
Recipes
Raised by:
Diego Berrueta
Opened on:
2009-04-06
Description:
Firstly reported by Antoine Issac, 12/Feb/2009:

[[[
Related to getting the SKOS RDF file by it default URI (or at least to test that
ability), I wanted to change my browser's headers so that it asks for RDF data
and not HTML anymore.
Following Sean's advice, I have installed the ModifyHeader plug-in for Firefox
(I'm still at version 2.0).

I now have the following problem.
I have changed the Accept header sent by my Firefox to application/rdf+xml (only)
On dbPedia, when it queries [1] , Firefox gets redirected to the RDF file [2].
Perfect!
But when it queries for the SKOS 2008 file [3], Firefox gets redirected to [4]
and not to [5].

How come? What is puzzling is that Vapour [6] reports that everything is ok with
both URIs [1] and [3], even though the behaviours differ when there is no
content negociation. Interestingly, Vapour itself recognizes my Accept headers:
when I activate the application/rdf+xml only, it sends its reports in RDF, while
it sends the HTML if I do nothing.

Is there something more than Accept header involved? Has my plug-in bugs, or am
I just too dumb to think of myself playing with that kind of stuff?

Thanks for any feedback,

Antoine


[1] http://dbpedia.org/resource/William_Shakespeare
[2] http://dbpedia.org/data/William_Shakespeare.rdf
[3] http://www.w3.org/2008/05/skos
[4] http://www.w3.org/TR/2008/WD-skos-reference-20080829/skos.html
[5] http://www.w3.org/TR/2008/WD-skos-reference-20080829/skos.rdf
[6] http://validator.linkeddata.org/

========================

http://www.w3.org/2008/05/skos

GET /2008/05/skos HTTP/1.1
Host: www.w3.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.20)
Gecko/20081217 Firefox/2.0.0.20
Accept: application/rdf+xml
Accept-Language: fr,en-us;q=0.8,fr-fr;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.x 303 See Other
Date: Thu, 12 Feb 2009 15:13:21 GMT
Server: Apache/2
Location: http://www.w3.org/TR/2008/WD-skos-reference-20080829/skos.html
Cache-Control: max-age=21600
Expires: Thu, 12 Feb 2009 21:13:21 GMT
Content-Length: 269
Connection: close
Content-Type: text/html; charset=iso-8859-1
]]]

( http://lists.w3.org/Archives/Public/public-swd-wg/2009Feb/0034.html )

The relevance of the User-Agent header was later identified by Diego Berrueta
and Sergio Fernandez, 13/Feb/2009:

[[[
This problem is a nice example of the risks of using the User-Agent
header for content negotiation. The server is issuing a redirect to the
HTML document when you use Firefox/IE, regardless of the content of the
Accept header. Compare these two requests:

$ curl -I -H "Accept: application/rdf+xml"
http://www.w3.org/2008/05/skos

HTTP/1.1 303 See Other
...
Location: http://www.w3.org/TR/2008/WD-skos-reference-20080829/skos.rdf
...


$ curl -I -H "Accept: application/rdf+xml" -H "User-agent: Mozilla/5.0
(X11; U; Linux i686; en-US; rv:1.9.0.6) Gecko/2009020409 Iceweasel/3.0.6
(Debian-3.0.6-1)" http://www.w3.org/2008/05/skos

HTTP/1.1 303 See Other
...
Location: http://www.w3.org/TR/2008/WD-skos-reference-20080829/skos.html
...


Best,

(Thanks to Sergio, in CC, for the HTTP traces)
]]]

( http://lists.w3.org/Archives/Public/public-swd-wg/2009Feb/0041.html )
Related emails:
  1. ISSUE-193: HTML served to browser even when RDF is explicitely requested in the Accept header (from dean+cgi@w3.org on 2009-04-06)
  2. [Recipes] new editors' draft (proposed solution to ISSUE-193) (from diego.berrueta@fundacionctic.org on 2009-04-07)
  3. Re: [Recipes] new editors' draft (proposed solution to ISSUE-193) (from tbaker@tbaker.de on 2009-04-21)
  4. Re: [Recipes] new editors' draft (proposed solution to ISSUE-193) (from tbaker@tbaker.de on 2009-04-21)
  5. meeting record: 2009-04-21 SemWeb Deployment WG telecon (from swick@w3.org on 2009-04-21)
  6. Re: [Recipes] new editors' draft (proposed solution to ISSUE-193) (from diego.berrueta@fundacionctic.org on 2009-04-30)

Related notes:

No additional notes.