Wiadomość napisana w dniu 2008-09-18, o godz. 13:17, przez Graham Dumpleton:
>>>> If using mod_python, the Apache LimitRequestBody directive doesn't >>>> work entirely properly. >>> I have heard of a "Content-length" variable (from PHP, but it's an >>> http >>> thing) -- how could I use that? request["Content-length"] or >>> something like >>> that. >> >> You can use, but you can not rely. Browsers are notorious liars, even >> if they provide any data in this header field. > > If Content-Length was an unreliable indicator of request content then > web applications wouldn't work properly. The only instance I know of > that Content-Length passed in to an application may not be correct is > when hosting on Apache and you have an Apache input filter installed > which mutates the input such that the amount of content changes. > Luckily things like using compression on request content is hardly > ever done and so this doesn't become an issue though. > > Now, where on earth have you got this idea that you can not rely on > Content-Length on a request? I saw actual request bodies larger than declared in content-lentgh with Firefox 2, this browser often was lying to my nginx in cases of small bodies by 1-4 bytes. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R&D, Redefine [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---