[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpclient-users
Subject:    Re: HTTP PUT
From:       Oleg Kalnichevski <olegk () apache ! org>
Date:       2006-06-19 16:01:17
Message-ID: 1150732877.23554.3.camel () localhost ! localdomain
[Download RAW message or body]

On Mon, 2006-06-19 at 16:51 +0100, Philip MacIver wrote:
> What I really want to know is how to add the content body to the request 
> after I have got the 100-continue, because at the moment when I try and 
> do that it doesn't add the file. And I am not sure how you do that, and 
> I cannot find an examples on the web  at all.

Well, that just cannot be done. One must fully provide content body
parameters prior to committing the request in order for HttpClient to be
able to set up the request head right and generate correct
Content-Length, Transfer-Encoding, Content-Type and such headers

Oleg


> 
> Roland Weber wrote:
> > Hello Philip,
> > 
> >> (and only then) should the file upload start. My problem is that at the
> >> moment whether the username/password is right or wrong the file upload
> >> happens and if the credentials are wrong it get discarded. Now this
> >> isn't a problem with small files but this application will be dealing
> >> with files 100s of MB large so it will cause unneeded delay and file
> >> uploading if I can't change.
> > 
> > you've already enabled the expect-continue handshake. If the server
> > still doesn't verify the credentials before sending the "continue",
> > you'll have to split your actions into two requests: the first to
> > make sure that the credentials are ok, the second for the upload.
> > You could/should also complain to whomever it is that implemented
> > the server that it doesn't work as it should. Note however that the
> > HTTP specification does not *require* servers to check credentials
> > before sending the "continue". It only suggests that they should.
> > 
> > hope that helps,
> >   Roland
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic