Closed mathjazz closed 11 years ago
The requested URL /:/ was not found on this server.
I think you mean /?/
Still, interesting bug. Possibly an issue with our standard apache configs?
I just tested this with the Django dev server and nginx. The problem is definitely with Apache/mod_wsgi not forwarding the request. It's not an issue with Django or playdoh, so there's nothing to fix here.
The default configuration of Apache doesn't allow encoded slashes %2F
in URLs. In Socorro, we had this problem when calling our middleware API with signatures containing slashes. We ended up encoding each slash twice in the UI, and then decoding them twice in the middleware.
For example, /search/signature/operator%2F
becomes /search/signature/operator%252F
before we call that URL, and in the middleware we do str.replace('%2F', '/')
on the signature
parameter (that we know can contain double-encoded slashes).
You can also change Apache's config to allow encoded slashes. We didn't do it because we thought they had a good reason not to allow it, but we didn't make any deep research on what the risks were.
This is interesting stuff (thanks for teaching us something, @AdrianGaudebert), but this is pretty far outside a Playdoh bug, so I am going to close it. Thanks!
Thank you guys for explanations!
My Playdoh-based app works as expected on development server.
But when I visit the following URL (on production server): http://domain.com/%3A%2F
It triggers Apache error (instead of Django 404 error): Not Found The requested URL /:/ was not found on this server. Apache/2.2.15 (CentOS) Server at pontoon-dev.mozillalabs.com Port 80
It seems like WSGI doesn't work as expected.