hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <o.kalnichev...@dplanet.ch>
Subject Re: HTTP Post and HTTP/100 (continue)
Date Tue, 25 Feb 2003 22:31:19 GMT
Simon
There's only one possible cause of the problem I can think of at the
moment is not flushing the output stream. If my assumption proves wrong,
I'll be left completely clueless. What OS are you using, btw? Somehow, I
have an impression that the problem is platform dependent. 
Oleg 



On Tue, 2003-02-25 at 23:17, Simon Roberts wrote:
> Attached is a log of my application (log4j, with most of the
> HttpConnection.isResponseAvaliable messages removed)
> 
> BTW: typo in method name
> 
> The interesting bit is that it times out (3 seconds) rather than getting the
> 100-continue response. Then, after it has send the body, the 100-continue
> response is received and returned (which is what is actually causing my
> problem).  The server is a current release version of Jetty
> http://jetty.mortbay.org/jetty/ which appears to be working perfectly in all
> other regards.
> 
> I get the same problem with HTTP PUT.
> 
> Adding
> 
>   method.setUseExpectHeader(false);
> 
> seems to fix it.
> 
> Cheers, Simon
> 
> 
> ----- Original Message -----
> From: "Oleg Kalnichevski" <o.kalnichevski@dplanet.ch>
> To: "Commons HttpClient Project" <commons-httpclient-dev@jakarta.apache.org>
> Cc: "Simon Roberts" <simon.roberts@fifthweb.net>
> Sent: Tuesday, February 25, 2003 10:18 PM
> Subject: Re: HTTP Post and HTTP/100 (continue)
> 
> 
> > Simon
> > I'd really appreciate it if you could send us the debug trace for
> > analysis. Please refer to the following url for instructions on how wire
> > log can be activated:
> >
> > http://jakarta.apache.org/commons/httpclient/logging.html
> >
> > Your problem should be easily solvable by disabling "100-continue"
> > handshake.
> >
> > PostMethod myhttppost = new PostMethod();
> > myhttppost.setUseExpectHeader(false);
> >
> > Cheers
> >
> > Oleg
> >
> >
> > On Tue, 2003-02-25 at 00:29, Simon Roberts wrote:
> > > Gidday,
> > >
> > > This is probably a dumb-user question, but if it is, then it might need
> to
> > > be documented for other dumb users :)
> > >
> > > I just checked out the latest CVS HttpClient and tried it with my
> > > application (it's using HEAD from a month or two ago), and am having a
> > > problem.
> > >
> > > Our app does HTTP POST (to a Jetty server, as it happens). Previously,
> > > httpclient used to just push the request header and body along in one
> lump,
> > > and when the server posted a http-100 (continue) status, it used to
> complain
> > > about "continue received, but body already sent".  Anyway, it used to
> work
> > > okay for us...
> > >
> > > Now, the httpClient.execute(method) returns 100, and there is no
> response
> > > (body) from the server, so my app barfs.
> > >
> > > The question is, how do I make httpclient send the body of the request?
> > > (maybe after I get the 100 back).
> > >
> > > Cheers, thanks, Simon
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> commons-httpclient-dev-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> commons-httpclient-dev-help@jakarta.apache.org
> >
> >
> 
> 
> ______________________________________________________________________
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message