W3C home > Mailing lists > Public > public-lod@w3.org > November 2010

Re: Is 303 really necessary?

From: Toby Inkster <tai@g5n.co.uk>
Date: Mon, 8 Nov 2010 10:11:11 +0000
To: Ian Davis <me@iandavis.com>
Cc: public-lod@w3.org
Message-ID: <20101108101111.4f34bc5a@miranda.g5n.co.uk>
On Thu, 4 Nov 2010 13:22:09 +0000
Ian Davis <me@iandavis.com> wrote:

> http://iand.posterous.com/is-303-really-necessary

Ian brings up numerous difficulties with 303 responses.

The two biggest issues in my opinion are:

	1. 303s can be tricky to configure unless you know your
	   way around the server environment you're using, and
	   have sufficient permissions on the server; and

	2. They require an additional HTTP request to get to the
	   data the client actually wants.

I think that without using RDF-specific publishing platforms (think
WordPress for Linked Data) #1 is always going to be a difficulty.
Even if we accept 200 OK as a response code for non-IR resources, this
only solves part of the server configuration problem. There are still
other issues to be solved - Apache doesn't come preconfigured with
media type information for N3/Turtle/N-Triples. And getting
neat-looking URIs (no ".rdf" suffix at the end) requires something like
mod_rewrite, Apache multiviews or ForceType to be configured. You could
try publishing an N-Triples file with no suffix, and cross your fingers
that Apache's default media type of "text/plain" will bubble up.

#2 on the other hand can be addressed quite easily. 303 responses are
allowed -- indeed encouraged -- to include an entity body. Servers
could be configured to duplicate the description of the non-IR resource
in this entity body. Or perhaps provide a more summarised description
there. Clients just need to look at it before deciding whether to follow
the redirect.

e.g.

	>>>>
	GET /toucan HTTP/1.1
	Host: example.com

	<<<<
	HTTP/1.1 303 See Other
	Location: http://example.com/doc
	Content-Type: text/turtle

	@prefix foaf: <http://xmlns.com/foaf/0.1/> .
	<toucan>
		foaf:name "Harry the Toucan" ;
		foaf:isPrimaryTopicOf <doc> .

	!!!! Here the client decides whether that's enough information.
	!!!! If it needs more, it continues by dereferencing <doc>. 

	>>>>
	GET /doc HTTP/1.1
	Host: example.com

	<<<<
	HTTP/1.1 200 OK
	Content-Location: http://example.com/doc.ttl
	Content-Type: text/turtle

	@prefix foaf: <http://xmlns.com/foaf/0.1/> .
	<toucan>
		foaf:name "Harry the Toucan" ;
		foaf:isPrimaryTopicOf <doc> ;
		foaf:birthday "10-24" .
	<doc>
		foaf:maker <alice> .

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>
Received on Monday, 8 November 2010 10:11:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:16:10 UTC