Last modified: 2014-04-29 22:14:37 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 T61926, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59926 - lighttpd redirects fail without a trailing slash
lighttpd redirects fail without a trailing slash
Status: RESOLVED FIXED
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Marc A. Pelletier
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-10 23:00 UTC by Matthew Bowker
Modified: 2014-04-29 22:14 UTC (History)
7 users (show)

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


Attachments

Description Matthew Bowker 2014-01-10 23:00:42 UTC
On the lighttpd web server in WMF labs, links fail if they don't contain a trailing slash.  Compare:

- http://tools.wmflabs.org/matthewrbowker/cnrd
- http://tools.wmflabs.org/matthewrbowker/cnrd/
Comment 1 Liangent 2014-03-08 15:24:04 UTC
For the record, links without trailing slashes are redirected to invalid (as seen from external world) host:

$ curl -v http://tools.wmflabs.org/matthewrbowker/cnrd
* Hostname was NOT found in DNS cache
* Adding handle: conn: 0x1144c10
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x1144c10) send_pipe: 1, recv_pipe: 0
*   Trying 208.80.153.201...
* Connected to tools.wmflabs.org (208.80.153.201) port 80 (#0)
> GET /matthewrbowker/cnrd HTTP/1.1
> User-Agent: curl/7.34.0
> Host: tools.wmflabs.org
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Date: Sat, 08 Mar 2014 15:22:44 GMT
* Server lighttpd/1.4.28 is not blacklisted
< Server: lighttpd/1.4.28
< Location: http://tools-webgrid-01:4058/matthewrbowker/cnrd/
< Content-Length: 0
< 
* Connection #0 to host tools.wmflabs.org left intact
Comment 2 Marc A. Pelletier 2014-03-11 22:56:00 UTC
This may appears to have been 'accidentally' fixed by turning ProxyPreserveHost On on the temporary apache proxies.
Comment 3 Matthew Bowker 2014-03-16 17:56:54 UTC
Appears to work for me.  Thank you so much for fixing!
Comment 4 Jarry1250 2014-04-17 08:51:31 UTC
Reopening, behaviour seems to have reappeared following the change to a new proxy setup.
Comment 5 Liangent 2014-04-17 15:32:06 UTC
(In reply to Jarry1250 from comment #4)
> Reopening, behaviour seems to have reappeared following the change to a new
> proxy setup.

See bug 64058.
Comment 6 Tim Landscheidt 2014-04-23 15:30:15 UTC
Unfortunately, this redirects from https to http, i. e.:

| [tim@passepartout ~]$ lynx -mime_header -dump https://tools.wmflabs.org/matthewrbowker/cnrd
| HTTP/1.1 301 Moved Permanently
| Server: nginx/1.5.0
| Date: Wed, 23 Apr 2014 15:28:21 GMT
| Content-Length: 0
| Connection: close
| Location: http://tools.wmflabs.org/matthewrbowker/cnrd/

| [tim@passepartout ~]$

So we'll need to teach lighttpd about https (or rewrite redirects in nginx?).
Comment 7 Liangent 2014-04-23 16:39:11 UTC
Not the same issue...
Comment 8 Marc A. Pelletier 2014-04-29 20:10:01 UTC
That is unrelated.  The proxy provides an X-FORWARDED-PROTO header which can be used by the application to construct URIs if it really must redirect between protocols.
Comment 9 Tim Landscheidt 2014-04-29 22:14:37 UTC
I filed bug #64627 for the https -> http issue.

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


Navigation
Links