[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/HTTP - DefaultPublisher.py:1.1.2.1 IHTTPPublisher.py:1.1.2.1 http.zcml:1.1.2.1

Stephan Richter srichter@cbu.edu
Wed, 27 Mar 2002 09:49:33 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/HTTP
In directory cvs.zope.org:/tmp/cvs-serv16355/HTTP

Added Files:
      Tag: Zope-3x-branch
	DefaultPublisher.py IHTTPPublisher.py http.zcml 
Log Message:
- Added XML-RPC support
- tweaked refactoring a little tp better support other HTTP sub-protocols
- Worked on security



=== Added File Zope3/lib/python/Zope/Publisher/HTTP/DefaultPublisher.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors. 
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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
# 
##############################################################################
"""

$Id: DefaultPublisher.py,v 1.1.2.1 2002/03/27 14:49:32 srichter Exp $
"""
from IHTTPPublisher import IHTTPPublisher


class DefaultPublisher:

    __implements__ =  IHTTPPublisher

    ############################################################
    # Implementation methods for interface
    # Zope.Publisher.HTTP.IHTTPPublisher

    def publishTraverse(self, request, name):
        'See Zope.Publisher.HTTP.IHTTPPublisher.IHTTPPublisher'

        return getattr(self, name)

    #
    ############################################################


=== Added File Zope3/lib/python/Zope/Publisher/HTTP/IHTTPPublisher.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors. 
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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
# 
##############################################################################
"""

$Id: IHTTPPublisher.py,v 1.1.2.1 2002/03/27 14:49:32 srichter Exp $
"""

from Interface import Interface

class IHTTPPublisher(Interface):

    def publishTraverse(request, name):
        """Lookup a name

        The request argument is the publisher request object.
        """


=== Added File Zope3/lib/python/Zope/Publisher/HTTP/http.zcml ===
<zopeConfigure
   xmlns='http://namespaces.zope.org/zope'
   xmlns:security='http://namespaces.zope.org/security'
>

  <security:protectClass name=".HTTPRequest."
    interface=".IHTTPApplicationRequest."
    permission_id="Zope.View" />

  <security:protectClass name=".HTTPRequest.URLGetter"
    permission_id="Zope.View" 
    methods="get, __getitem__" />

</zopeConfigure>