passenger icon indicating copy to clipboard operation
passenger copied to clipboard

Use unquote PATH_INFO with wsgi/python

Open avkarenow opened this issue 9 years ago • 8 comments

Hello,

next problem is with enoding PATH_INFO when python is used: url: http://HOST/url%20with%20space Passenger: PATH_INFO: /url%20with%20space Nginx + FastCGI: PATH_INFO: /url with space Django runserver: 'PATH_INFO': u'/url with space', PHP: _SERVER["PATH_INFO"] /url with space

Testing APP:

#!/usr/bin/env python

def application(environ, start_response):
        start_response("200 OK", [])
        return environ["PATH_INFO"]

Patch to fix this attached. helper-scripts__wsgi-loader.py.patch2.txt

avkarenow avatar Jun 15 '16 15:06 avkarenow

Thanks, it looks like the requirements for Python are opposite of what we need for Rails. We'll have a look at fixing this; the best place would be in the C++ Core instead of the loader though.

OnixGH avatar Jul 07 '16 15:07 OnixGH

Because of this issue it is not possible to properly run Seafile's Django web-ui (seahub) using Apache/Passenger.

Although quite ugly, the proposed wsgi-loader modification works. Please fix it in the C++ Core asap.

sebastianlipponer avatar Sep 27 '16 12:09 sebastianlipponer

@sebastianlipponer I have Seafile (incl. web ui) 6.0.4 running successfully with Nginx/Passenger 5.0.30.

OnixGH avatar Oct 14 '16 12:10 OnixGH

@OnixGH Yes, with Nginx/Passenger things are different. See also https://github.com/haiwen/seafile/issues/1501. Using Apache/Passenger without the fix, it is not possible to access files in folders with whitespaces in their names.

sebastianlipponer avatar Oct 14 '16 12:10 sebastianlipponer

Looks like someone translated this patch to apply to seafile directly too. We'll see if that gets landed.

CamJN avatar Dec 01 '16 15:12 CamJN

Is this issue fixed or not yet?

avkarenow avatar May 08 '17 16:05 avkarenow

Not yet, sorry.

CamJN avatar May 08 '17 18:05 CamJN

Are there any plans on working on this issue?

samupl avatar Nov 18 '21 14:11 samupl