HTTP Status Code 510 usage

Viewed 5992

I'm getting to know the http status codes and kind of stuck on the 510 Not Extended.

It's mentioned on many sites like wikipedia but not under the unofficial codes. However when I read the rfc2774 it's labelled 'Experimental'.

  • So should I assume that it's (not?) used? Do any servers/sites support/use it?

I also wonder how the status code is supposed to work

  • Do you use 510 only if the client attempted to send a Man or C-Man that is not supported by the server?

    • (update) It seems that the apache http server htaccess ErrorDocument returns "A mandatory extension policy in the request is not accepted by the server for this resource." askapache.com
    • (update) OTOH Servers can force the use of the HTTP Extension Framework by using the 510 "Not Extended" HTTP status code. Simple Object Access Protocol (SOAP) 1.1
  • How does a server send back all the information necessary for the client to issue an extended request?

The rfc says

The policy for accessing the resource has not been met in the request. The server should send back all the information necessary for the client to issue an extended request. It is outside the scope of this specification to specify how the extensions inform the client.

What does this mean?

I'd figure it worked something like

(Must use GET on resource /html and the extension "x")

HTTP/1.1 510 Extended
M-GET /html
Man : "http://www.company.com/extension"; ns=11
11-ext : "x"

HTTP/1.1 510 Extended
M-GET /html
C-Man : "http://www.company.com/extension"; ns=11
11-ext : "x"
Connection: C-Man, 11-ext

But section 6 says this

A server MUST NOT include mandatory extension declarations in an HTTP response unless it is responding to a mandatory HTTP request whose definition allowed for the mandatory response or the server has some a priori knowledge that the recipient can handle the extended response. A server MAY include optional extension declarations in any HTTP response (see section 4).

As a note. I read that the "ext" and "c-ext" are not relevant here because

The extension response header fields are exclusively intended to serve as extension acknowledgements, and can not carry any other information.

(update) Example 4 SOAP Using HTTP Extension Framework in section 6.4 SOAP HTTP Examples looks similar to my example?

M-POST /StockQuote HTTP/1.1
Man: "http://schemas.xmlsoap.org/soap/envelope/"; ns=NNNN
Content-Type: text/xml; charset="utf-8"
Content-Length: nnnn
NNNN-SOAPAction: "http://electrocommerce.org/abc#MyMessage"

<SOAP-ENV:Envelope...

HTTP/1.1 200 OK
Ext:
Content-Type: text/xml; charset="utf-8"
Content-Length: nnnn

<SOAP-ENV:Envelope...
0 Answers
Related