Commit 976fba1d authored by Andy McKay's avatar Andy McKay

Check in for #342 on behalf of slinkp

parent 929c2246
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
############################################################################## ##############################################################################
'''CGI Response Output formatter '''CGI Response Output formatter
$Id: HTTPResponse.py,v 1.70 2002/09/24 22:13:26 jeremy Exp $''' $Id: HTTPResponse.py,v 1.71 2002/12/17 00:38:17 andym Exp $'''
__version__ = '$Revision: 1.70 $'[11:-2] __version__ = '$Revision: 1.71 $'[11:-2]
import types, os, sys, re import types, os, sys, re
import zlib, struct import zlib, struct
...@@ -423,8 +423,11 @@ class HTTPResponse(BaseResponse): ...@@ -423,8 +423,11 @@ class HTTPResponse(BaseResponse):
return body.encode('latin1','replace') return body.encode('latin1','replace')
def setBase(self,base): def setBase(self,base):
'Set the base URL for the returned document.' """Set the base URL for the returned document.
if not base.endswith('/'): If base is None, or the document already has a base, do nothing."""
if base is None:
base = ''
elif not base.endswith('/'):
base = base+'/' base = base+'/'
self.base = base self.base = base
......
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