Merge ~cjwatson/launchpad:testfix-py3-sane-environment into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: ad062eb3f3140a84ab99afa28cbee4ea0ed5d3e8
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:testfix-py3-sane-environment
Merge into: launchpad:master
Diff against target: 12 lines (+0/-1)
1 file modified
lib/lp/services/webapp/servers.py (+0/-1)
Reviewer Review Type Date Requested Status
Thiago F. Pappacena (community) Approve
Review via email: mp+392329@code.launchpad.net

Commit message

Don't copy environ in BasicLaunchpadRequest.__init__

Description of the change

This broke pagetest access logging, which relies on reading the userid and pageid back from the environment.

Fixes lib/lp/app/stories/basics/xx-pagetest-logging.txt test failure caused by https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/392140.

To post a comment you must log in.
Revision history for this message
Thiago F. Pappacena (pappacena) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/services/webapp/servers.py b/lib/lp/services/webapp/servers.py
2index 5c82ad0..bcf1621 100644
3--- a/lib/lp/services/webapp/servers.py
4+++ b/lib/lp/services/webapp/servers.py
5@@ -584,7 +584,6 @@ class BasicLaunchpadRequest(LaunchpadBrowserRequestMixin):
6 # chance to recode anything. This change will convert a 400
7 # error to a 404, because traversal will raise NotFound when it
8 # encounters a non-ASCII path part.
9- environ = dict(environ)
10 pi = environ['PATH_INFO']
11 if isinstance(pi, bytes):
12 pi = pi.decode('utf-8', 'replace')

Subscribers

People subscribed via source and target branches

to status/vote changes: