/usr/share/pyshared/zope/publisher/normal.clb is in python-zope.publisher 3.12.6-2ubuntu1.
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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | Publisher framework base collaboration
Participants:
publisher:IPublisher
request:IPublisherRequest
response:IPublicationResponse = request.getResponse()
publication:IPublication = request.getPublication()
Values:
root
"the top-level object"
foo
"an object obtaines by traversing the root with 'foo'"
bar
"an object obtaines by traversing the root with 'bar'"
result
"The result of calling bar"
Scenario: Normal, path = foo/bar
"Show normal publishing of a simple path without errors"
publisher.publish(request)
request.processInputs()
publication.beforeTraversal(request)
publication.getApplication(request)
"Get the root object to be traversed"
request.traverse(root)
publication.callTraversalHooks(request, root)
'''Call any "before traversal step" hooks. These hooks
should be called before traversing an object for the
first time. If the same object is traversed more than
once, the hook will still only be called the first
time.
The last constraint is probably important to get
virtual host semantics rigfht. :)
'''
publication.traverseName(request, root, 'foo')
publication.callTraversalHooks(request, foo)
publication.traverseName(request, foo, 'bar')
return bar
publication.afterTraversal(request, bar)
publication.callObject(request, bar)
return result
response.setBody(result)
publication.afterCall(request, bar)
response.outputBody()
request.close()
Scenario: Error during application call, path = foo
"Show what heppens when the main application code raises an error"
publisher.publish(request)
request.processInputs()
publication.beforeTraversal(request)
publication.getApplication(request)
request.traverse(root)
publication.callTraversalHooks(request, root)
publication.traverseName(request, root, 'foo')
return foo
publication.afterTraversal(request, foo)
publication.callObject(request, foo)
raise AttributeError, 'spam'
publication.handleException()
response.outputBody()
request.close()
|