Optional OpenAPI Endpoints for TAP 1.2 / User-managed Tables
Mark Taylor
m.b.taylor at bristol.ac.uk
Fri Nov 29 16:04:41 CET 2024
On Fri, 29 Nov 2024, Gregory MANTELET via dal wrote:
> Finally, if we refer to RFC 9110 <https://www.rfc-editor.org/rfc/rfc9110> we
> have the following texts:
To me, these support use of 405 not 501 in this case.
Joshua's example was use of PUT to /tables.
> > 15.5.6. 405 Method Not Allowed
> > <https://www.rfc-editor.org/rfc/rfc9110#name-405-method-not-allowed>
> >
> > The 405 (Method Not Allowed) status code indicates that the method
> > received in the *request-line is known by the origin server but
> > not supported by the target resource.* The origin server MUST
> > generate an Allow header field in a 405 response containing a list
> > of the target resource's currently supported methods.
In this case PUT is an HTTP method known to the server,
but not supported by the target resource (/tables), so 405 looks correct.
> > 15.6.2. 501 Not Implemented
> > <https://www.rfc-editor.org/rfc/rfc9110#status.501>
> >
> > The 501 (Not Implemented) status code indicates that the server
> > does not support the functionality required to fulfill the
> > request. This is the appropriate response when *the server does
> > not recognize the request method and is not capable of supporting
> > it for any resource*.
The server does recognise the HTTP PUT method and may well support it
for other resources, just not /tables, so 501 is not suitable.
My understanding is that 501 is for an HTTP method that's not
recognised like "FOO" or "DELEET", or perhaps one that's just
not implemented at all by the server.
Mark
--
Mark Taylor Astronomical Programmer Physics, Bristol University, UK
m.b.taylor at bristol.ac.uk https://www.star.bristol.ac.uk/mbt/
More information about the dal
mailing list