SPARQL endpoint returns 302 Found intead of 303 See Other
Accessing the sparql endpoint without the final '/':
~/work/mulgara/examples $ curl -I http://localhost:8080/sparql HTTP/1.1 302 Found Location: http://localhost:8080/sparql/ Content-Length: 0 Server: Jetty(6.1.x)
Shouldn't it return "303 See other"?
Updated by ronald - almost 13 years ago
- Status changed from New to Closed
- Resolution set to invalid
No, 302 is the correct response here, though a 301 is probably better.
303 means "the response to your request can be found elsewhere (as
given by the Location header)", and is typically used in response to a
POST; the 301/302/307 codes are saying that the resource has moved
elsewhere and that the client should resend its request to the new
resource. In other words, with a 303 the original URI was the correct
one, it's just that the response is to be retrieved from another place
rather than being returned directly; with a 301/302/307 the URI was
not the correct one in the first place, and instead the new one is.
This distinction is more obvious with POSTs, but still holds true for
Btw., use -L with curl to get it to follow redirections automatically.