Commit 6e6f40bb authored by 's avatar

Updated from 2.3 branch

parent cc83ce7e
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
# #
############################################################################## ##############################################################################
__version__='$Revision: 1.44 $'[11:-2] __version__='$Revision: 1.45 $'[11:-2]
import regex, re, sys, os, string, urllib import regex, re, sys, os, string, urllib
from string import lower, atoi, rfind, split, strip, join, upper, find from string import lower, atoi, rfind, split, strip, join, upper, find
...@@ -304,11 +304,16 @@ class HTTPRequest(BaseRequest): ...@@ -304,11 +304,16 @@ class HTTPRequest(BaseRequest):
host = strip(environ['HTTP_HOST']) host = strip(environ['HTTP_HOST'])
hostname, port = splitport(host) hostname, port = splitport(host)
# some clients manage to forget the port :( # NOTE: some (DAV) clients manage to forget the port. This
if port is None and environ.has_key('SERVER_PORT'): # can be fixed with the commented code below - the problem
s_port=environ['SERVER_PORT'] # is that it causes problems for virtual hosting. I've left
if s_port not in ('80', '443'): # the commented code here in case we care enough to come
port=s_port # back and do anything with it later.
#
# if port is None and environ.has_key('SERVER_PORT'):
# s_port=environ['SERVER_PORT']
# if s_port not in ('80', '443'):
# port=s_port
else: else:
hostname = strip(environ['SERVER_NAME']) hostname = strip(environ['SERVER_NAME'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment