Do you have an example of the URL being used? How long exactly is it?

The limit on length of header value size is determined by the 
LimitRequestFieldSize directive. This defaults to 8190.

http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestfieldsize 
<http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestfieldsize>

If exceeded I am not sure what Apache would do. I can’t imagine that it would 
simply truncate it and would probably expect a 400 response if anything.

Also, what does the Apache access log show as the URL it recorded, along with 
status.

If the request is getting through the WSGI application and it is that which is 
rejecting it, then you can perhaps use a variation on either of:

http://modwsgi.readthedocs.org/en/develop/user-guides/debugging-techniques.html#displaying-request-environment
http://modwsgi.readthedocs.org/en/develop/user-guides/debugging-techniques.html#tracking-request-and-response
 
<http://modwsgi.readthedocs.org/en/develop/user-guides/debugging-techniques.html#tracking-request-and-response>

to capture the request environment so you can see what is getting through the 
application.

Note that Apache will normalise the URL in various ways where as some simple 
pure Python web servers may not. So it could well be that something was in the 
URL that got transformed by Apache causing the application to then not find the 
referenced resource.

Graham

> On 17 Feb 2016, at 8:17 AM, Horcle Buzz <[email protected]> wrote:
> 
> Sorry for any duplication of this post on SO:
> 
> I have a python Flask wsgi API in which I process incoming URL payloads of 
> varied length. I believe, but am not absolutely sure, that I may have run 
> into a limitation of URL size.
> 
> For a particular payload (> 6K characters), it runs fine locally using the 
> Python web server, but when I move it to Apache (on both OS X and RHEL 6), I 
> get a 404 error @ the browser. According to everything I've seen for too 
> large of payload, I should be getting a 413 or 414 error. Please note, that 
> for shorter URLs than this, I have no problems running them in Apache.
> 
> I've combed my Apache logs and all I can find is the error that "Target WSGI 
> script not found or unable to stat." Everything I've Googled with this 
> particular error is indicative of an application error, and as noted, I do 
> know my wsgi configuration works. It just seems to break for larger URLs, 
> which makes me think this may be an issue with mod_wsgi.
> 
> FWIW: my VirtualHost config is:
> 
> <VirtualHost *:80>
> 
> 
>     Alias /cardiocatalogqt   /Library/WebServer/extjs/cardioCatalogQT
>     <Location /cardiocatalogqt>
>         Order deny,allow
>         Allow from all
>     </Location>
> 
>     WSGIApplicationGroup %{GLOBAL}
> 
>     WSGIDaemonProcess rest_api user=gregsilverman  threads=5
>     WSGIScriptAlias /api /Library/WebServer/wsgi/rest_api/rest_api.wsgi
>     WSGIPassAuthorization On
>     <Location /api>
>         Order deny,allow
>         Allow from all
>     </Location>
> 
> 
> </VirtualHost>
> Any suggestions, short of shortening the URLs, would be most welcome.
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/modwsgi 
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to