Skip to content

Commit

Permalink
Some initial refactoring of the publisher; more comments when checkin…
Browse files Browse the repository at this point in the history
…g in

to the trunk.
  • Loading branch information
strichter committed Sep 2, 2005
0 parents commit 74ea315
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions methodnotallowed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Method Not Allowed errors
=========================

If we get a request with a method that does not have a corresponding
view, HTTP 405 Method Not Allowed response is returned:

>>> print http(r"""
... FROG / HTTP/1.1
... """)
HTTP/1.1 405 Method Not Allowed
Allow: DELETE, MKCOL, OPTIONS, PROPFIND, PROPPATCH, PUT
Content-Length: 18
Content-Type: text/plain
<BLANKLINE>
Method Not Allowed

The requests below should return 405, but instead crash with a TypeError,
when the view tries to adapt context to IWriteFile.

# >>> print http(r"""
# ... DELETE / HTTP/1.1
# ... Authorization: Basic mgr:mgrpw
# ... """, handle_errors=False)
# HTTP/1.1 405 Method Not Allowed
# ...
#
# >>> print http(r"""
# ... PUT / HTTP/1.1
# ... Authorization: Basic mgr:mgrpw
# ... """, handle_errors=False)
# HTTP/1.1 405 Method Not Allowed
# ...

0 comments on commit 74ea315

Please sign in to comment.