- Timestamp:
- 06/08/10 09:52:10 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
framework/server/trunk/mapfish/controllers/printer.py
r3512 r3561 27 27 import re 28 28 import simplejson 29 import urlparse 29 30 30 31 from pylons.controllers import WSGIController … … 207 208 """ 208 209 actionUrl = url(controller="printer", action=actionName, id=id) 210 211 # in 2.0 we'll support "baseurl" only, so the following code 212 # block will be removed. And the fromAction argument of this 213 # function will also be removed. 209 214 if request.params.has_key('url'): 210 215 fullUrl = request.params['url'].encode('utf8') … … 215 220 return fullUrl[0:-len(myUrl)] + actionUrl 216 221 log.warn("Cannot guess the base URL for " + fullUrl + " (action=" + myUrl + ")") 217 return request.scheme + "://" + request.host + actionUrl 222 223 if request.params.has_key('baseurl'): 224 return request.params['baseurl'].encode('utf8') + actionUrl.split('/')[-1] 225 return urlparse.urlunparse((request.scheme, request.host, actionUrl, None, None, None)) 218 226 219 227 def _addURLs(self, json):
