Please help, Does anyone know how to override the Mongrel request URI limits built in? I know it was set at a 512 byte limit, but my application will not work with this in place. Why do I need a larger limit? I''ve written a rails application that uses a bookmarklet to send large amounts of data from site to site. The only way to do this is (and keep it cross browser compatible) is by building and sending a large URI. Is there a way to override this? Or can someone point me in the right direction to do it myself? Thanks! -Gregg
On Fri, 29 Sep 2006 17:44:21 -0400 "Gregg Pollack" <greggpollack at gmail.com> wrote:> Please help, > > Does anyone know how to override the Mongrel request URI limits > built in? I know it was set at a 512 byte limit, but my application > will not work with this in place. >The winnar! I was wondering when this would happen. It''s currently a compile time limit since nobody had ever busted through it, but it''s no longer 512. It is 2k for the whole REQUEST_URI, 1024 for the REQUEST_PATH, and 10k for the QUERY_STRING. Now that I look at it that doesn''t add up right (should be 11k for request_uri total). I''ll update that for the next release of Mongrel and you can get it with: gem install mongrel --source=http://mongrel.rubyforge.org/releases/> Why do I need a larger limit? I''ve written a rails application > that uses a bookmarklet to send large amounts of data from site to > site. The only way to do this is (and keep it cross browser > compatible) is by building and sending a large URI.How large are we talking?> Is there a way to override this? Or can someone point me in the > right direction to do it myself? >Nope, I could make it a configurable thing but it''s not on the radar any time soon. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.
On 9/29/06, Gregg Pollack <greggpollack at gmail.com> wrote:> Please help, > > Does anyone know how to override the Mongrel request URI limits > built in? I know it was set at a 512 byte limit, but my application > will not work with this in place. > > Why do I need a larger limit? I''ve written a rails application > that uses a bookmarklet to send large amounts of data from site to > site. The only way to do this is (and keep it cross browser > compatible) is by building and sending a large URI.I''m sure it''s right there in the source, just search for the string 512. It''s probably in mongrel.rb or defined in a file in the ext/http11 directory. But why do you think that is the only way to keep it cross browser compatible? I can''t imagine that being true, as what you are doing is considered bad practice and prone to causing problems for you down the road. Chris
If someone can show me how to invoke a POST request using ONLY javascript, I''m all ears. You can''t use any HTML (since the request is going to be coming from someone elses website), you can only use javascript to construct and send a the request, you can''t include any external libraries, and the javascript is limited to around 256 characters. There''s a challenge for ya ;-) -Gregg On 9/29/06, snacktime <snacktime at gmail.com> wrote:> On 9/29/06, Gregg Pollack <greggpollack at gmail.com> wrote: > > Please help, > > > > Does anyone know how to override the Mongrel request URI limits > > built in? I know it was set at a 512 byte limit, but my application > > will not work with this in place. > > > > Why do I need a larger limit? I''ve written a rails application > > that uses a bookmarklet to send large amounts of data from site to > > site. The only way to do this is (and keep it cross browser > > compatible) is by building and sending a large URI. > > I''m sure it''s right there in the source, just search for the string > 512. It''s probably in mongrel.rb or defined in a file in the > ext/http11 directory. But why do you think that is the only way to > keep it cross browser compatible? I can''t imagine that being true, as > what you are doing is considered bad practice and prone to causing > problems for you down the road. > > Chris > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
On 9/30/06, Gregg Pollack <greggpollack at gmail.com> wrote:> If someone can show me how to invoke a POST request using ONLY > javascript, I''m all ears. You can''t use any HTML (since the request > is going to be coming from someone elses website), you can only use > javascript to construct and send a the request, you can''t include any > external libraries, and the javascript is limited to around 256 > characters. > > There''s a challenge for ya ;-)Your requirements don''t make any sense, how are you invoking the GET without html? Since you said something about browser compatibility I''m assuming it''s a link someone clicks on, and hence uses html. And what makes you assume you have to construct the request with javascript? I highly doubt that''s necessary. In any case I''ll bet that it''s fairly simple to convert to a POST. If you need to or not is another story. IF you are submitting these large GET requests to other sites where you don''t know what limits will be imposed, I would not use a GET. If it''s to sites you control, or to some sort of web service/api where you know what the limits are, then it''s probably not that big of a deal. IMO it''s bad practice because there are too many things that can come back and bite you later on stuffing that much data into a GET request.
On 9/30/06, Gregg Pollack <greggpollack at gmail.com> wrote:> If someone can show me how to invoke a POST request using ONLY > javascript, I''m all ears. You can''t use any HTML (since the request > is going to be coming from someone elses website), you can only use > javascript to construct and send a the request, you can''t include any > external libraries, and the javascript is limited to around 256 > characters. > > There''s a challenge for ya ;-)I suppose XMLHttpRequest can be used for that, even though it wouldn''t be easy to pack it to 256 bytes I can see another code golfing challenge ;-) (and tinyurl/rubyurl to the rescue...)