hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalnichevski, Oleg" <oleg.kalnichev...@bearingpoint.com>
Subject RE: [PATCH] PostMethod & PutMethod revision (take 2)
Date Fri, 31 Jan 2003 16:03:14 GMT
Jandalf

Got ya. I have just managed to reproduce the behaviour of "buggy" servers that ignore Expect:
100-continue header and discovered BIG FAT NASTY bugs in my code. So, I am currently busy
busting those bugs. I'll proceed implementing your suggestions once all bugs are dealt with.
I'll look into possibility of simplifying request buffering as well

Stay tuned. Good thing come to those who wait

Oleg

-----Original Message-----
From: Jeffrey Dever [mailto:jsdever@sympatico.ca]
Sent: Freitag, 31. Januar 2003 16:54
To: Commons HttpClient Project
Subject: Re: [PATCH] PostMethod & PutMethod revision (take 2)


>
>
>>Internally we should just have one "body" datamember, which would be an 
>>InputStream.  When setting the request body, if the streamBody() form is 
>>used, its trivial.  When the stringBody() is used, create a 
>>StringInputStream which is easy.  When the parametersBody() form is 
>>used, url encode it to a string, and use that as the input stream, also 
>>easy.  
>>    
>>
>I am not sure if we can totally do away with additional byte[] buffer member variable,
unless you are prepared to completely sacrifice ability to repeat requests (if case of re-authentication,
for instance). It may be a reasonable thing to do, though, as it turns out Post & Put
requests MUST NOT be automatically redirected without user intervention according to RFC 2616
>  
>

No redirection does work in our favour.  Not sure what to do about the 
authentication issue.  It would be really lame to post a multi-megabyte 
file only to be challenged for authentication and have to resend.  We 
can buffer small bodies, but not big ones.  With stringBody and and 
parametersBody at least we know how big they are, and perhaps there 
could be some decision to buffer.  

The client really should do a HEAD before a POST so authentication is 
performed before large files are sent over the wire.

Jandalf.


---------------------------------------------------------------------
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