cURL / Mailing Lists / curl-library / Single Mail

curl-library

Strange POST problem

From: Peter Morelli <peter_at_achex.com>
Date: Thu, 5 Jul 2001 14:52:29 -0700

We've been using libcurl 7.8 and 7.7.3 to post data to a servlet running on
Weblogic 5.1 sp 9. For some strange reason, if we go ONE byte over 2047, we
get an exception thrown in our server, way before our own code, in the
depths of weblogic. It's made even stranger by the fact that we can easily
post more the 500K to the servlet using a web page form (pasted into
textarea), using the Java net api, or a COM api. We also did a test install
of resin, another servlet engine, and it accepted libcurl posts just fine.

This behavior is also present in the curl command line tool.

Using SSL or not doesn't seem to matter.

Here's the curl command we use to test data:

%> curl -N -v -d "test+3=xxx[2000 more x's cut for brevity]" --url
"http://testserver/TestServlet

Java exception stack trace:

java.io.IOException: Resetting to invalid mark
        at java.io.BufferedInputStream.reset(BufferedInputStream.java:373)
        at
weblogic.servlet.internal.ServletInputStreamImpl.reset(ServletInputStreamImp
l.java:56)
        at
weblogic.servlet.internal.ServletRequestImpl.mergePostParams(ServletRequestI
mpl.java:532)
        at
weblogic.servlet.internal.ServletRequestImpl.parseQueryParams(ServletRequest
Impl.java:369)
        at
weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl
.java:566)
        at
weblogic.servlet.internal.ServletRequestImpl.initSessionInfo(ServletRequestI
mpl.java:1313)
        at
weblogic.servlet.internal.ServletRequestImpl.getSession(ServletRequestImpl.j
ava:1225)
        at
weblogic.servlet.internal.ServletContextImpl.checkA(ServletContextImpl.java:
1874)
        at
weblogic.servlet.internal.ServletContextImpl.checkAccess(ServletContextImpl.
java:1735)
        at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:912)
        at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:879)
        at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
        at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
        at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
--------------- nested within: ------------------
weblogic.utils.NestedRuntimeException: cannot parse POST parameters of
request /TestServlet - with nested exception:
[java.io.IOException: Resetting to invalid mark]
        at
weblogic.servlet.internal.ServletRequestImpl.mergePostParams(ServletRequestI
mpl.java:544)
        at
weblogic.servlet.internal.ServletRequestImpl.parseQueryParams(ServletRequest
Impl.java:369)
        at
weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl
.java:566)
        at
weblogic.servlet.internal.ServletRequestImpl.initSessionInfo(ServletRequestI
mpl.java:1313)
        at
weblogic.servlet.internal.ServletRequestImpl.getSession(ServletRequestImpl.j
ava:1225)
        at
weblogic.servlet.internal.ServletContextImpl.checkA(ServletContextImpl.java:
1874)
        at
weblogic.servlet.internal.ServletContextImpl.checkAccess(ServletContextImpl.
java:1735)
        at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:912)
        at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:879)
        at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
        at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
        at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)

Any ideas?

--pete

-----------------------------------------
Peter Morelli
Senior Engineer
peter_at_achex.com
http://www.achex.com

_______________________________________________
Curl-library mailing list
http://curl.haxx.se/libcurl/
Received on 2001-07-05