HTTP 414 Error (URI Too Long) on Ajax.Updater Post

288 views
Skip to first unread message

Doug Kaye

unread,
Jul 31, 2008, 3:06:24 AM7/31/08
to Prototype & script.aculo.us
Trying to figure out why I'm getting a 414 error (Request-URI to
large) from Apache when issuing an Ajax.Updater call using the default
method ('post'). The url length is about 6,350 bytes, which I'd expect
wouldn't be a problem for a POST. Using Prototype.js 1.6. Anyone seen
this?

T.J. Crowder

unread,
Jul 31, 2008, 5:43:59 AM7/31/08
to Prototype & script.aculo.us
Hi,

> The url length is about 6,350 bytes, which I'd expect
> wouldn't be a problem for a POST.

Whether the request is a GET or POST doesn't affect whether the length
of the URL is limited. The difference between GET and POST is that
with a GET, you encode all parameters in the URL; with a POST, you
send them in the request body, not the URL. So the URL length limit
applies (this is largely the original reason for POST), it's just that
you don't care because the parameters are being sent separately and so
the URL is usually fairly short.

So: Are you encoding a really long URL in your code? If so, you may
want to put those parameters in the body instead. If you think you're
putting them in the body already, probably best to post a snippet of
code so the folks here can see if they can see anything.

Hope this helps,
--
T.J. Crowder
tj / crowder software / com
Reply all
Reply to author
Forward
0 new messages