hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland Weber (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCLIENT-536) misleading lack of javadoc in StringRequestEntity
Date Mon, 05 Jun 2006 19:55:30 GMT
    [ http://issues.apache.org/jira/browse/HTTPCLIENT-536?page=comments#action_12414840 ] 

Roland Weber commented on HTTPCLIENT-536:
-----------------------------------------

Hi Oleg,

I think inline links need to be written as {@link #...}, not just #...
Otherwise, the patch looks fine.

cheers (and good night :-),
  Roland


> misleading lack of javadoc in StringRequestEntity
> -------------------------------------------------
>
>          Key: HTTPCLIENT-536
>          URL: http://issues.apache.org/jira/browse/HTTPCLIENT-536
>      Project: Jakarta HttpClient
>         Type: Bug

>   Components: HttpClient
>     Versions: 3.0 RC4
>  Environment: Operating System: other
> Platform: Other
>     Reporter: Guillaume Cottenceau
>     Assignee: HttpClient Dev
>      Fix For: 3.1 Alpha 1
>  Attachments: patch-37805.diff, stringentity.patch, stringentity.patch, stringentity.patch
>
> When using httpclient2, we were doing the following:
> 	// Add the Content-type header.  This sets the charset to UTF-8.
> 	method.setRequestHeader( "Content-type", "text/xml; charset=UTF-8" );
> 	// The given string is converted internally by the post method into
> 	// a UTF-8 encoded byte array.
> 	method.setRequestBody( xmlstring );
> The comments show that this was the way we used to obtain a UTF-8 encoded XML
> document (if this was wrong, that may be the origin of the problem?).
> When upgrading to httpclient3 and killing deprecated code, this was converted to:
> 	// Add the Content-type header.  This sets the charset to UTF-8.
> 	method.setRequestHeader( "Content-type", "text/xml; charset=UTF-8" );
> 	// The given string is converted internally by the post method into
> 	// a UTF-8 encoded byte array.
>         method.setRequestEntity( new StringRequestEntity( xmlstring ) );
> which went without problem during the tests on my machine and on test production
> machine.. because platforms charset were UTF-8, which is not the case for
> production machines :(
> I think the javadoc of the used StringRequestEntity constructor should strongly
> state that it uses String#getBytes for the content, which uses the platform
> charset. Also, I didn't notice any "upgrade to 3.x" documentation which would
> have helped me :/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


Mime
View raw message