You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Bill Vanyo <va...@gmail.com> on 2005/05/26 20:47:39 UTC

Inconsistency in deprecation of EntityEnclosingMethod.CONTENT_LENGTH_CHUNKED?

>From the commons-httpclient-3.0-rc2 javadocs,
EntityEnclosingMethod.CONTENT_LENGTH_CHUNKED is listed as deprecated,
with the note to use setContentChunked(boolean), presumably instead of
setRequestContentLength(EntityEnclosingMethod.CONTENT_LENGTH_CHUNKED).

However, the RequestEntity interface's getContentLength method is
documented to return EntityEnclosingMethod.CONTENT_LENGTH_CHUNKED for
chunked data.

RequestEntity is relatively new, and must be used if one wishes to
avoid using deprecated methods, yet requires use of a deprecated field
to send chunked data.

Am I right that there's an inconsistency here?  Can I send chunked
data (in a http post) without using anything deprecated?

  Thanks,
  Bill Vanyo

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


Re: Inconsistency in deprecation of EntityEnclosingMethod.CONTENT_LENGTH_CHUNKED?

Posted by Oleg Kalnichevski <ol...@apache.org>.
Bill,

This is indeed a problem and it has already been fixed in SVN trunk

http://issues.apache.org/bugzilla/show_bug.cgi?id=34459

The fix will be included in the coming RC3 release. Meanwhile consider
using the latest nightlies:

http://svn.apache.org/builds/jakarta-commons/nightly/commons-httpclient/

Oleg

On Thu, 2005-05-26 at 14:47 -0400, Bill Vanyo wrote:
> From the commons-httpclient-3.0-rc2 javadocs,
> EntityEnclosingMethod.CONTENT_LENGTH_CHUNKED is listed as deprecated,
> with the note to use setContentChunked(boolean), presumably instead of
> setRequestContentLength(EntityEnclosingMethod.CONTENT_LENGTH_CHUNKED).
> 
> However, the RequestEntity interface's getContentLength method is
> documented to return EntityEnclosingMethod.CONTENT_LENGTH_CHUNKED for
> chunked data.
> 
> RequestEntity is relatively new, and must be used if one wishes to
> avoid using deprecated methods, yet requires use of a deprecated field
> to send chunked data.
> 
> Am I right that there's an inconsistency here?  Can I send chunked
> data (in a http post) without using anything deprecated?
> 
>   Thanks,
>   Bill Vanyo
> 
> ---------------------------------------------------------------------
> 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