Closed Bug 554576 Opened 15 years ago Closed 15 years ago

Force SCRIPT_NAME='' for darklaunch pages

Categories

(addons.mozilla.org Graveyard :: API, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: krupa.mozbugs, Assigned: jbalogh)

References

()

Details

(Whiteboard: [z][5.8.1])

Attachments

(2 files)

steps to reproduce: Go to https://services.addons.mozilla.org/en-US/firefox/api/1.5/search/le observed behavior: URLs in search results include /z example: <link> https://addons.mozilla.org/z/en-US/firefox/user/5119145/?src=api </link>
Assignee: nobody → dd
Target Milestone: --- → 5.9
oremj: we should be forcing the SCRIPT_NAME to '' if X-amo-darklaunch is in the headers. Can we do that in Apache? If not, we can handle it in zamboni.wsgi.
When I rewrite from /z -> / it fixed the script_name, but for darklaunch stuff I think you'll need to use the X-amo-darklaunch header.
How can I tell from the request/environment that this is a darkluanch page?
Assignee: dd → jbalogh
OS: Mac OS X → All
Priority: -- → P2
Hardware: x86 → All
Summary: /z noticed in search result URLs in SAMO → Force SCRIPT_NAME='' for darklaunch pages
Version: unspecified → 4.x
I've been doing http.addHeader( "X-Zeus-DL-PT", "552612" ); so you can just check if X-Zeus-DL-PT is there.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [z][5.8.1]
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached image screenshot
Depends on: 554788
This is where I tried to fix the SCRIPT_NAME for dark launch pages: http://github.com/jbalogh/zamboni/commit/40a730200b. It works locally when I have `RequestHeader set X-Zeus-DL-PT 55` in my httpd.conf. I can see the right header in the admin/env output in attachment 435651 [details]. Is it possible that zamboni.wsgi isn't getting loaded properly? oremj, clouserw, any ideas?
Should I just uncomment: # def application(env, start_response): # start_response('200 OK', [('Content-Type', 'text/plain')]) # return '\n'.join('%s: %s' % item for item in sorted(env.items()))
oremj figured out that we need to set SCRIPT_URL: http://github.com/jbalogh/zamboni/commit/b3cbdc01 You shouldn't see /z in dark launch urls anymore.
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
verified that "X-amo-darklaunch: z" pages do not have the /z in URLs https://preview.addons.mozilla.org/en-US/firefox/api/1.5/search/le does not have any URLs with /z
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: