|
|
89c94b |
diff --git a/modules/proxy/mod_proxy_uwsgi.c b/modules/proxy/mod_proxy_uwsgi.c
|
|
|
89c94b |
index 792d35e..9dcbed1 100644
|
|
|
89c94b |
--- a/modules/proxy/mod_proxy_uwsgi.c
|
|
|
89c94b |
+++ b/modules/proxy/mod_proxy_uwsgi.c
|
|
|
89c94b |
@@ -453,11 +453,8 @@ static int uwsgi_handler(request_rec *r, proxy_worker * worker,
|
|
|
89c94b |
const char *proxyname, apr_port_t proxyport)
|
|
|
89c94b |
{
|
|
|
89c94b |
int status;
|
|
|
89c94b |
- int delta = 0;
|
|
|
89c94b |
- int decode_status;
|
|
|
89c94b |
proxy_conn_rec *backend = NULL;
|
|
|
89c94b |
apr_pool_t *p = r->pool;
|
|
|
89c94b |
- size_t w_len;
|
|
|
89c94b |
char server_portstr[32];
|
|
|
89c94b |
char *u_path_info;
|
|
|
89c94b |
apr_uri_t *uri;
|
|
|
89c94b |
@@ -469,23 +466,14 @@ static int uwsgi_handler(request_rec *r, proxy_worker * worker,
|
|
|
89c94b |
|
|
|
89c94b |
uri = apr_palloc(r->pool, sizeof(*uri));
|
|
|
89c94b |
|
|
|
89c94b |
- /* ADD PATH_INFO */
|
|
|
89c94b |
-#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
|
|
|
89c94b |
- w_len = strlen(worker->s->name);
|
|
|
89c94b |
-#else
|
|
|
89c94b |
- w_len = strlen(worker->name);
|
|
|
89c94b |
-#endif
|
|
|
89c94b |
- u_path_info = r->filename + 6 + w_len;
|
|
|
89c94b |
- if (u_path_info[0] != '/') {
|
|
|
89c94b |
- delta = 1;
|
|
|
89c94b |
- }
|
|
|
89c94b |
- decode_status = ap_unescape_url(url + w_len - delta);
|
|
|
89c94b |
- if (decode_status) {
|
|
|
89c94b |
+ /* ADD PATH_INFO (unescaped) */
|
|
|
89c94b |
+ u_path_info = ap_strchr(url + sizeof(UWSGI_SCHEME) + 2, '/');
|
|
|
89c94b |
+ if (!u_path_info || ap_unescape_url(u_path_info) != OK) {
|
|
|
89c94b |
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10100)
|
|
|
89c94b |
- "unable to decode uri: %s", url + w_len - delta);
|
|
|
89c94b |
+ "unable to decode uwsgi uri: %s", url);
|
|
|
89c94b |
return HTTP_INTERNAL_SERVER_ERROR;
|
|
|
89c94b |
}
|
|
|
89c94b |
- apr_table_add(r->subprocess_env, "PATH_INFO", url + w_len - delta);
|
|
|
89c94b |
+ apr_table_add(r->subprocess_env, "PATH_INFO", u_path_info);
|
|
|
89c94b |
|
|
|
89c94b |
|
|
|
89c94b |
/* Create space for state information */
|