"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Products/SiteAccess/VirtualHostMonster.py" between
Zope-2.13.28.tar.gz and Zope-2.13.29.tar.gz

About: Zope2 Z Object Publishing Environment - web application platform used for building content management systems, intranets, portals, and custom applications.

VirtualHostMonster.py  (Zope-2.13.28):VirtualHostMonster.py  (Zope-2.13.29)
skipping to change at line 18 skipping to change at line 18
from Acquisition import Implicit from Acquisition import Implicit
from App.Dialogs import MessageDialog from App.Dialogs import MessageDialog
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
from Persistence import Persistent from Persistence import Persistent
from ZPublisher.BeforeTraverse import NameCaller from ZPublisher.BeforeTraverse import NameCaller
from ZPublisher.BeforeTraverse import queryBeforeTraverse from ZPublisher.BeforeTraverse import queryBeforeTraverse
from ZPublisher.BeforeTraverse import registerBeforeTraverse from ZPublisher.BeforeTraverse import registerBeforeTraverse
from ZPublisher.BeforeTraverse import unregisterBeforeTraverse from ZPublisher.BeforeTraverse import unregisterBeforeTraverse
from ZPublisher.BaseRequest import quote from ZPublisher.BaseRequest import quote
from ZPublisher.HTTPRequest import splitport
from zExceptions import BadRequest from zExceptions import BadRequest
class VirtualHostMonster(Persistent, Item, Implicit): class VirtualHostMonster(Persistent, Item, Implicit):
"""Provide a simple drop-in solution for virtual hosting. """Provide a simple drop-in solution for virtual hosting.
""" """
meta_type='Virtual Host Monster' meta_type='Virtual Host Monster'
priority = 25 priority = 25
id = 'VHM' id = 'VHM'
skipping to change at line 153 skipping to change at line 154
'''Traversing at home''' '''Traversing at home'''
vh_used = 0 vh_used = 0
stack = request['TraversalRequestNameStack'] stack = request['TraversalRequestNameStack']
path = None path = None
while 1: while 1:
if stack and stack[-1] == 'VirtualHostBase': if stack and stack[-1] == 'VirtualHostBase':
vh_used = 1 vh_used = 1
stack.pop() stack.pop()
protocol = stack.pop() protocol = stack.pop()
host = stack.pop() host = stack.pop()
if ':' in host: request.setServerURL(protocol, *splitport(host))
host, port = host.split(':')
request.setServerURL(protocol, host, port)
else:
request.setServerURL(protocol, host)
path = list(stack) path = list(stack)
# Find and convert VirtualHostRoot directive # Find and convert VirtualHostRoot directive
# If it is followed by one or more path elements that each # If it is followed by one or more path elements that each
# start with '_vh_', use them to construct the path to the # start with '_vh_', use them to construct the path to the
# virtual root. # virtual root.
vh = -1 vh = -1
for ii in range(len(stack)): for ii in range(len(stack)):
if stack[ii] == 'VirtualHostRoot': if stack[ii] == 'VirtualHostRoot':
vh_used = 1 vh_used = 1
 End of changes. 2 change blocks. 
5 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)