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

Reply via email to