This file is indexed.

/usr/share/pyshared/zope/app/publication/methodnotallowed.txt is in python-zope.app.publication 3.13.2-0ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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:

  >>> from zope.app.wsgi.testlayer import http

  >>> print http("""\
  ... FROG / HTTP/1.1
  ... """)
  HTTP/1.0 405 Method Not Allowed
  Content-Length: 18
  Allow: DELETE, OPTIONS, PUT
  ...

  >>> print http("""\
  ... DELETE / HTTP/1.1
  ... """)
  HTTP/1.0 405 Method Not Allowed
  ...

Trying to PUT on an object which does not support PUT leads to 405:

  >>> print http("""\
  ... PUT / HTTP/1.1
  ... Authorization: Basic mgr:mgrpw
  ... """)
  HTTP/1.0 405 Method Not Allowed
  ...

Trying to PUT a not existing object on a container which does not support
PUT leads to 405:

  >>> print http("""\
  ... PUT /asdf HTTP/1.1
  ... Authorization: Basic mgr:mgrpw
  ... """)
  HTTP/1.0 405 Method Not Allowed
  ...

When ``handle_errors`` is set to ``False`` a traceback is displayed:

  >>> print http("""\
  ... PUT / HTTP/1.1
  ... Authorization: Basic mgr:mgrpw
  ... """, handle_errors=False)
  Traceback (most recent call last):
  MethodNotAllowed: <zope.site.folder.Folder object at 0x...>, <zope.publisher.http.HTTPRequest instance URL=http://localhost>