-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some initial refactoring of the publisher; more comments when checkin…
…g in to the trunk.
- Loading branch information
0 parents
commit 74ea315
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
# ... |