comparison src/server/server.py @ 1044:3d97c93561ff

server: don't change request.uri and request.path on redirection: the original URL must actually be used
author Goffi <goffi@goffi.org>
date Wed, 24 Jan 2018 20:23:23 +0100
parents 6b906b1f419a
children b2eeb9ac2ab8
comparison
equal deleted inserted replaced
1043:d8666fdb015c 1044:3d97c93561ff
332 old=request.uri.decode('utf-8'), 332 old=request.uri.decode('utf-8'),
333 new=uri.decode('utf-8'), 333 new=uri.decode('utf-8'),
334 )) 334 ))
335 # we change the request to reflect the new url 335 # we change the request to reflect the new url
336 request.postpath = path_list[1:] + request.postpath 336 request.postpath = path_list[1:] + request.postpath
337 request.uri = '/'.join([uri] + request.postpath)
338 request.path = '/'.join([path] + request.postpath)
339 request.args = args 337 request.args = args
340 338
341 # we start again to look for a child with the new url 339 # we start again to look for a child with the new url
342 return self.getChildWithDefault(path_list[0], request) 340 return self.getChildWithDefault(path_list[0], request)
343 341