Hi Christian, Thanks for the report. I've just fixed this bug in SVN. If you can wait a bit, we will release a RC6 today.
Best regards, Jerome > -----Message d'origine----- > De : news [mailto:[EMAIL PROTECTED] De la part de Christian Ohr > Envoyé : mercredi 21 mars 2007 09:58 > À : [email protected] > Objet : HttpClientConverter ignores CharacterSet header of > request entity > > Hi there, > > after some time of playing with both server and client part > of the restlet lib > (rc5), it seems to me that the CharacterSet is not > transmitted in the list of > http entity headers. > > My client test code looks like this: > > Request createRequest = new Request(Method.POST, > REPOSITORY_RESOURCE); > Representation r = new StringRepresentation("some small test", > MediaType.TEXT_PLAIN, Language.ALL, > CharacterSet.ISO_8859_1); > createRequest.setEntity(r); > Client client = new Client(Protocol.HTTP); > Response createResponse = client.handle(createRequest); > > On the server side, however, the ISO-8859-1 does not arrive. > Looking at > com.noelios.restlet.http.HttpClientConverter (starting at > line 260) I miss the > part where the character set is appended to the CONTENT_TYPE > header ("text/plain > ; charset=ISO-8859-1"). > > Using the commons-httpclient equivalent, everything works as expected: > > PostMethod postMethod = new PostMethod(REPOSITORY_RESOURCE); > RequestEntity r = new StringRequestEntity("some small test", > "text/plain","ISO-8859-1"); > postMethod.setRequestEntity(r); > HttpClient client = new HttpClient(); > int result = client.executeMethod(postMethod); > > Has anyone else encountered this? I didn't try patching yet; > just wanted to know > first if I'm on the wrong track. > > best regards > Christian Ohr

