This file is indexed.

/usr/share/pyshared/zope/app/publication/requestpublicationfactories.py 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
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
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Publication factories.

This module provides factories for tuples (request, publication).
"""
__docformat__ = 'restructuredtext'

from zope import component
from zope.interface import implements
from zope.app.publication.interfaces import IRequestPublicationFactory
from zope.app.publication import interfaces
from zope.app.publication.soap import SOAPPublication
from zope.app.publication.xmlrpc import XMLRPCPublication
from zope.app.publication.http import HTTPPublication
from zope.publisher.xmlrpc import XMLRPCRequest
from zope.app.publication.browser import BrowserPublication
from zope.publisher.http import HTTPRequest
from zope.publisher.browser import BrowserRequest

class SOAPFactory(object):

    implements(IRequestPublicationFactory)

    def canHandle(self, environment):
        self.soap_req = component.queryUtility(interfaces.ISOAPRequestFactory)
        return bool(environment.get('HTTP_SOAPACTION') and self.soap_req)

    def __call__(self):
        return self.soap_req, SOAPPublication


class XMLRPCFactory(object):

    implements(IRequestPublicationFactory)

    def canHandle(self, environment):
        return True

    def __call__(self):
        request_class = component.queryUtility(
            interfaces.IXMLRPCRequestFactory, default=XMLRPCRequest)
        return request_class, XMLRPCPublication


class HTTPFactory(object):

    implements(IRequestPublicationFactory)

    def canHandle(self, environment):
        return True

    def __call__(self):
        request_class = component.queryUtility(
            interfaces.IHTTPRequestFactory, default=HTTPRequest)
        return request_class, HTTPPublication

class BrowserFactory(object):

    implements(IRequestPublicationFactory)

    def canHandle(self, environment):
        return True

    def __call__(self):
        request_class = component.queryUtility(
                interfaces.IBrowserRequestFactory, default=BrowserRequest)
        return request_class, BrowserPublication