summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a1432b1)
raw | patch | inline | side by side (parent: a1432b1)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 5 Apr 2004 06:13:42 +0000 (06:13 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 5 Apr 2004 06:13:42 +0000 (06:13 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2254 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
roundup/cgi/actions.py | patch | blob | history | |
roundup/cgi/client.py | patch | blob | history | |
roundup/roundupdb.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index 58975a4f4c1a6a35984534b5b9c1af990aa5e3c9..26ee060f7501960ac0f17a53b7d8c144c9dd1798 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
- export and import now include journals (incompatible with export < 0.7)
- added "download_url" method to generate a correctly quoted URL for file
download links (sf bug 927745)
+- all uses of TRACKER_WEB now ensure it ends with a '/'
2004-03-27 0.7.0b2
diff --git a/roundup/cgi/actions.py b/roundup/cgi/actions.py
index df368eb0014274f9102f2f7ceefb1871547eb0f1..e8f91d72b282360efca107bbeb9e368725bd4514 100755 (executable)
--- a/roundup/cgi/actions.py
+++ b/roundup/cgi/actions.py
-#$Id: actions.py,v 1.22 2004-03-31 23:08:39 richard Exp $
+#$Id: actions.py,v 1.23 2004-04-05 06:13:42 richard Exp $
import re, cgi, StringIO, urllib, Cookie, time, random
d = {'input': n, 'classname': t}
raise SeriousError, _(
'"%(input)s" is not an ID (%(classname)s ID required)')%d
- url = '%s%s%s'%(self.db.config.TRACKER_WEB, t, n)
+ url = '%s%s%s'%(self.base, t, n)
raise Redirect, url
class RetireAction(Action):
diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py
index c34d4266208fa8c2dd2b5a7aad92ed1ba6f23788..b68d3afec33e2bd4a96c9ddf87d2ae57b1867a19 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $Id: client.py,v 1.169 2004-03-26 05:16:03 richard Exp $
+# $Id: client.py,v 1.170 2004-04-05 06:13:42 richard Exp $
"""WWW request handler (also used in the stand-alone server).
"""
# this is the base URL for this tracker
self.base = self.instance.config.TRACKER_WEB
+ # check the tracker_we setting
+ if not self.base.endswith('/'):
+ self.base = self.base + '/'
+
# this is the "cookie path" for this tracker (ie. the path part of
# the "base" url)
self.cookie_path = urlparse.urlparse(self.base)[2]
diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py
index 35ff9239b376c772ec5c4f8b9956e4b42cb350ea..d59d41e64e8970f2d37d0c42a49331b0e00fa615 100644 (file)
--- a/roundup/roundupdb.py
+++ b/roundup/roundupdb.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: roundupdb.py,v 1.105 2004-03-27 00:12:11 richard Exp $
+# $Id: roundupdb.py,v 1.106 2004-04-05 06:13:42 richard Exp $
"""Extending hyperdb with types specific to issue-tracking.
"""
base = self.db.config.TRACKER_WEB
if (not isinstance(base , type('')) or
not (base.startswith('http://') or base.startswith('https://'))):
- base = "Configuration Error: TRACKER_WEB isn't a " \
+ web = "Configuration Error: TRACKER_WEB isn't a " \
"fully-qualified URL"
- elif base[-1] != '/' :
- base += '/'
- web = base + self.classname + nodeid
+ else:
+ if not base.endswith('/'):
+ base = base + '/'
+ web = base + self.classname + nodeid
# ensure the email address is properly quoted
email = straddr((self.db.config.TRACKER_NAME,