Opened 5 years ago

Last modified 5 years ago

#3683 defect new

twisted.web generates 501 for "unsupported" methods, but it should never do this

Reported by: glyph Owned by:
Priority: normal Milestone:
Component: web Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description

RFC 2616:

10.5.2 501 Not Implemented

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
.

(emphasis mine)

Given that twisted.web handles requests on a per-resource basis, extension methods may well be supported by other resources on the server. There's no way that we can know while handling one particular resource what the entire rest of the server may or may not support.

In this case it seems like the server should maybe generate a NOT_ALLOWED, or maybe even a SERVER_ERROR.

Change History (2)

comment:1 Changed 5 years ago by jknight

web2 returns NOT_ALLOWED; see t.web2.resource.RenderMixin.renderHTTP.

comment:2 Changed 3 years ago by <automation>

  • Owner glyph deleted
Note: See TracTickets for help on using tickets.