[Mongrel] Long URLs - New to Mongrel
Zed A. Shaw
zedshaw at zedshaw.com
Wed Mar 7 13:34:10 EST 2007
On Wed, 7 Mar 2007 08:02:23 -0500
Joe Lester <joe_lester at sweetwater.com> wrote:
> My rails web app (rails 1.2.1) uploads an image from a Java applet by
> encoding it into the URL. This works fine when I'm using Webrick. I'm
> trying out Mongrel today, and I'm getting an error in Safari that
> says “lost network connection” (NSURLErrorDomain:-1005). I get
> something similar in Firefox. Is there a way to make Mongrel accept a
> really long URL like this?
> Thanks. Joe.
Joe, Mongrel enforces limits on the data it accepts in order to prevent
various attacks. As many other folks mentioned you should probably be
encoding that in a POST rather than GET request. Just for your
reference, here's the limits that you'll hit:
FIELD_NAME = 256
FIELD_VALUE = 80 * 1024
REQUEST_URI = 1024 * 12
REQUEST_PATH = 1024
QUERY_STRING = 1024 * 10
HEADER = 1024 * (80 + 32)
FIELD_VALUE and HEADER limits are mostly to allow for the insane size
of Cookies. You're probably hitting the QUERY_STRING limit of 10k or
the REQUEST_URI of 12k with your request.
Have a good one.
Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu
http://www.awprofessional.com/title/0321483502 -- The Mongrel Book
More information about the Mongrel-users