Prefix middleware keeps on appending slashes

Issue #742 resolved
Gili created an issue

I am using this prefix middleware in my configuration:

# prefix middleware for rc
use = egg:PasteDeploy#prefix
prefix = /hg

use = egg:rhodecode
filter-with = proxy-prefix

When I hit http://localhost/hg/ it works fine. But when I hit http://localhost/hg// (notice the double slash) I get redirected over and over again with an extra slash added each time.

Comments (4)

  1. Marcin Kuzminski repo owner

    Very odd it doesn't seems to be related to RhodeCode rather how the browser behaves. There's nothing in the logs and If i turn off RhodeCode server completely the slash redirection still happens.

  2. Gili reporter

    The browser is not at fault. If you invoke wget you'll get:

    HTTP request sent, awaiting response... 301 Moved Permanently
    Location: [following]

    and so on. The Location header returned by Rhodecode is wrong.

  3. Marcin Kuzminski repo owner

    ok i see now, looks like a bug in waitress, switching to old paste#http doesn't have that issue

  4. Log in to comment