tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Einfeldt" <ralph.einfe...@uptime-isc.de>
Subject AW: AW: HTTP POST request: maximum allowed data?
Date Thu, 15 Nov 2001 12:00:15 GMT
This won't work.

Your form is perfoming a post, but your js function
performs just a get:

 
window.open("../servlet/myServlet?query="+document.form1.myQuery.value);

This is always a GET, independent of the way you called it.

> -----Ursprüngliche Nachricht-----
> Von: Sonia Galilea Varea [mailto:galilea@ebro.cps.unizar.es]
> Gesendet: Donnerstag, 15. November 2001 12:11
> An: Tomcat Users List
> Betreff: Re: AW: HTTP POST request: maximum allowed data?
> 
> 
> Hi Ralph,
> 
>     Sorry for not having explained  well, but what I exactly do is:
> 
> What I exactly do is:
> 
> <FORM NAME="form1" ACTION="javascript:myFunc()" METHOD="post">
>         <INPUT TYPE="hidden" NAME="myQuery" VALUE="myquery">
>         ...
> </FORM>
> 
> and in my javascript file:
> 
> function myFunc() {
>     myWin =
> window.open("../servlet/myServlet?query="+document.form1.myQue
> ry.value);
> }
> 
> (That is because I want the result page to be a new page, not the same
> page...)
> 
> So, I'm sure I'm doing a POST.
> 
> If you say that with GET, the problem can be th browser, the 
> server or the
> proxies,
> What html server are you using?. Perhaps the problem is 
> there. I'm using
> Tomcat 3.2.1, and the URI that I create has normal 
> characters, except the
> character '%'.
> Do you think this has something to do with? I think that the '%' has
> nothing to do with,
> but I'm not sure.
> Do you have any idea about what happens?
> 
> Thanks,
> 
>     Sonia.
> 
> 
> 
> 
> Ralph Einfeldt escribió:
> 
> > With POST I don't know any size restrictions.
> > We have used post requests to upload several hundred KBytes.
> >
> > With GET there are size restrictions which are limited by
> > the browser, the http server and sometimes even by the
> > proxies between the browser and your web server.
> >
> > The limit is typically a few thousend bytes.
> >
> > What you are doing is a GET.
> >
> > To do a post from HTML/JavaScript you need a form
> > with method="post". The data you want to send
> > must be a value of a input field (not part of
> > the action url, that has the same limitations
> > as the GET method).
> >
> > References:
> >
> > Microsoft IE:
> >   http://support.microsoft.com/support/kb/articles/Q208/4/27.ASP
> >
> > A general statement:
> >   http://www.phpbuilder.com/mail/phplib-list/2000081/0001.php
> >
> > >From the HTTP 1.1 Spec:
> >   http://www.faqs.org/rfcs/rfc2068.html:
> >    The HTTP protocol does not place any a priori limit on 
> the length of
> >    a URI. Servers MUST be able to handle the URI of any 
> resource they
> >    serve, and SHOULD be able to handle URIs of unbounded 
> length if they
> >    provide GET-based forms that could generate such URIs. A server
> >    SHOULD return 414 (Request-URI Too Long) status if a URI 
> is longer
> >    than the server can handle (see section 10.4.15).
> >
> >       Note: Servers ought to be cautious about depending on 
> URI lengths
> >       above 255 bytes, because some older client or proxy
> >       implementations might not properly support these lengths.
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Sonia Galilea Varea [mailto:galilea@ebro.cps.unizar.es]
> > > Gesendet: Donnerstag, 15. November 2001 10:57
> > > An: Tomcat Users List
> > > Betreff: HTTP POST request: maximum allowed data?
> > >
> > >
> > > Hi all,
> > >
> > > I have to tranfer data from a html form to a servlet, by
> > > using the HTTP POST
> > > request.
> > >
> > > I do it by javascript:
> > >
> > > myWin = window.open("../servlet/myServlet?query="+myQuery);
> > >
> > > I wonder what's the maximum allowed data to send with a POST
> > > command. And the
> > > GET?
> > > I had a look in the RFC but didn't find any size limitation.
> > > But there is one,
> > > because I get an exception
> > > if my URL is too large...
> > >
> > > Is there a way to setup the web server (I'm currently using Tomcat
> > > standalone 3.2.1) to accept more data?
> > >
> > > Thanks for any info.
> > >
> > >     Sonia.
> > >
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe:   
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands:
<mailto:tomcat-user-help@jakarta.apache.org>
> > Troubles with the list:
<mailto:tomcat-user-owner@jakarta.apache.org>
> >
> >
> >
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message