Last modified: 2014-04-23 15:14:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T66274, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64274 - Tool Labs project URLs don't work without a trailing slash
Tool Labs project URLs don't work without a trailing slash
Status: RESOLVED DUPLICATE of bug 64058
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Yuvi Panda
https://tools.wmflabs.org/gerrit-patc...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-23 05:40 UTC by MZMcBride
Modified: 2014-04-23 15:14 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description MZMcBride 2014-04-23 05:40:45 UTC
$ curl -I "https://tools.wmflabs.org/gerrit-patch-uploader/"
HTTP/1.1 200 OK
Server: nginx/1.5.0

^ This is fine. No problem here.

But if you omit the trailing slash:

$ curl -I "https://tools.wmflabs.org/gerrit-patch-uploader"
HTTP/1.1 500 Internal Server Error
Server: nginx/1.5.0

^ This is pretty obnoxious.
Comment 1 Ori Livneh 2014-04-23 06:20:01 UTC
I *think* it's <https://github.com/wikimedia/operations-puppet/blob/production/modules/dynamicproxy/files/urlproxy.lua#L23>:

local captures = ngx.re.match(ngx.var.uri, "^/([^/]*)(/.*)?$")
-- ...
L31 then assigns captures[2] (which is nil when there is no trailing slash) to rest, which fails to match against any of the patterns.

Maybe L31 should read:

local rest = captures[2] or '/'
Comment 2 Tim Landscheidt 2014-04-23 15:14:46 UTC

*** This bug has been marked as a duplicate of bug 64058 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links