> Hello.
>
> My Django app receives large file uploads, so I have set "limit-post"
> relatively high. However, I would like to lower this limit for requests
> that are not file uploads. For example, a rule like this:
>
> if request header "Content-Type" equals
> "application/x-www-form-urlencoded" set limit-post to 1000000
>
> or
>
> if request header "Content-Type" "equals
> application/x-www-form-urlencoded" and (no header Content-Length or header
> Content-Length > 1000000) return error 500
>
> I've looked at
> http://uwsgi-docs.readthedocs.org/en/latest/InternalRouting.html and it
> doesn't seem to be possible to use Content-Type or Content-Length, or to
> set limit-post. Is this the case?
>
> Best regards,
> André
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>

You could remove the limit-post option and use routing:

route-if = ishigher:${CONTENT_LENGTH};100000 break:413 Request Entity Too
Large

-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to