Hello, HTTP/1.1 200 OK Date: Wed, 08 Aug 2007 09:07:50 GMT Server: Apache/1.3.37 (Unix) mod_perl/1.30 Etag: 20070808090246 Last-modified: Wed, 08 Aug 2007 09:02:46 GMT Transfer-Encoding: chunked Content-Type: text/x.socialtext-wiki; charset=UTF-8
How I can modify the request response ? It is generate automatically . Thanks. -----Message d'origine----- De : Thierry Boileau [mailto:[EMAIL PROTECTED] Envoyé : mercredi 8 août 2007 19:36 À : [email protected] Objet : Re: Etag Issue Hello, it seems that the Etag value must be surrounded with quotes such as : ETag: "xyzzy" (see the Http rfc n° 2616, chapter 14.19) Best regards, Thierry Boileau > Hi, > > > This is an example file : > > // Prepare the request > > MediaType mediaWiki = new > MediaType("text/x.socialtext-wiki"); > Request request = new Request(Method.GET, > "_http://c-mambo.rd.francetelecom.fr/data/workspaces/test/pages/Titre2 > _ > <https://parici.sopragroup.com/basicwebmail/exchweb/bin/redir.asp?URL=http://c-mambo.rd.francetelecom.fr/data/workspaces/test/pages/Titre2>"); > ChallengeResponse challengeResponse = new > ChallengeResponse(ChallengeScheme.HTTP_BASIC, > "[EMAIL PROTECTED]", "crte1234"); > request.setChallengeResponse(challengeResponse); > > request.getClientInfo().getAcceptedMediaTypes().add(new > Preference<MediaType>(mediaWiki)); > > // Handle it using an HTTP client connector > Client client = new Client(Protocol.HTTP); > > Response response = client.handle(request); > // Write the response entity on the console > try { > response.getEntity().write(System.out); > } catch (IOException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > > } > > When clien.handle(request). I have an exception > > INFO: Error while handling an HTTP client call > java.lang.IllegalArgumentException: Invalid tag format detected: > 20070808090246 > at org.restlet.data.Tag.parse(Tag.java:69) > at > com.noelios.restlet.http.HttpClientCall.getResponseEntity(HttpClientCall.java:279) > at > com.noelios.restlet.http.HttpClientConverter.commit(HttpClientConverter.java:110) > at > com.noelios.restlet.http.HttpClientHelper.handle(HttpClientHelper.java:86) > at org.restlet.Client.handle(Client.java:110) > at org.restlet.Uniform.handle(Uniform.java:97) > > On wireshark, i see my request send to the server GET > /data/workspaces/test/pages/Titre2 HTTP/1.1 > User-Agent: Noelios-Restlet-Engine/1.0.1 > Accept: text/x.socialtext-wiki > Authorization: Basic > bGxlY2xlcmMyLmV4dEBvcmFuZ2UtZnRncm91cC5jb206Y3J0ZTEyMzQ= > Host: c-mambo.rd.francetelecom.fr > > > > HTTP/1.1 200 OK > Date: Wed, 08 Aug 2007 09:07:50 GMT > Server: Apache/1.3.37 (Unix) mod_perl/1.30 > Etag: 20070808090246 > Last-modified: Wed, 08 Aug 2007 09:02:46 GMT > Transfer-Encoding: chunked > Content-Type: text/x.socialtext-wiki; charset=UTF-8 > 48 > Test > ---- > Test de commentaire > > _amendement ajout.. par {user: null} _ 0 > > So I think, i have a problem with Etag but i don't find any solution. > > Thanks >

