Hi Mikkel, I went ahead and implemented the proposed workaround. Now the AWS authorization header is computed with an "application/x-www-form-urlencoded" content-type header value when: - no content found - method is not PUT - Java version starts with "1.4" or "1.5"
As I haven't tested it directly against Amazon S3, could you let me know if it works? http://www.restlet.org/downloads/current.zip Best regards, Jerome Louvel > -----Message d'origine----- > De : Jerome Louvel > Envoyé : samedi 28 octobre 2006 12:09 > À : discuss@restlet.tigris.org > Objet : RE: Adding standard headers > > > Hi Mikkel, > > As you said, the problem lies in a JDK bug (details at: > http://www.restlet.org/faq#18). One workaround is to use JDK > 6 beta 2 if possible. > > Otherwise, I don't know how to workaround the bug. Setting > the content type to "" may solve the issue? Could you try? > Otherwise, we always have the possibility to consider the > content type to be "application/x-www-form-urlencoded" when > signing for AWS... > > Best regards, > Jerome > > > -----Message d'origine----- > > De : news [mailto:[EMAIL PROTECTED] De la part de Mikkel Jensen > > Envoyé : vendredi 27 octobre 2006 19:44 > > À : discuss@restlet.tigris.org > > Objet : Re: Adding standard headers > > > > Hi Jerome, > > > > Just tried implementing the AWS challenge scheme as you > > suggested and it works > > great! > > > > The only problem I seem to have is with 'empty' requests: > > When there is no entity representation in the request the > > Content-type is set > > to a default value of 'application/x-www-form-urlencoded' for > > all request > > methods except 'PUT' - in which case the header is left out!!! > > > > I'm aware that the problem lies with the HttpURLConnection > > class. But, if you > > have any suggestions for a way to remove (or explicitly set) > > the content-type > > I would very much like to hear it! > > > > So far the rule stated above seems to hold up so I am able to > > construct the AWS > > credential correctly. It just seems like bad programming > > style to have to > > depend on some fairly undocumented default value. > > > > - Mikkel > > > > > >