[ 
https://issues.apache.org/jira/browse/JCLOUDS-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13849162#comment-13849162
 ] 

Ignasi Barrera commented on JCLOUDS-405:
----------------------------------------

This has also been commited in 1.6.x: 
https://git-wip-us.apache.org/repos/asf?p=jclouds.git;a=commit;h=e86462d499a2a98f0a07592b6181eb96bc22181c

Just for the record, the applied patch fixes the PATCH method over HTTPS (due 
to a check that the JRE implementation of the HttpUrlConnection only makes when 
the connection is HTTP).

To have the issue properly fixed and working for all protocols, a different 
implementation of the HttpUrlConnection should be used. There is a [work in 
progress patch|https://github.com/jclouds/jclouds/pull/232] to include a driver 
tor [OkHttp|http://square.github.io/okhttp/] to jclouds, that should allow us 
to properly support PATCH.

Although the "partial" patch has already be submitted, the issue will remain 
open until we can have it working for both HTTP and HTTPS.

> PATCH method does not work in HTTPS connections or in HTTP with a body
> ----------------------------------------------------------------------
>
>                 Key: JCLOUDS-405
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-405
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-core
>    Affects Versions: 1.6.2
>            Reporter: Ignasi Barrera
>            Assignee: Ignasi Barrera
>             Fix For: 1.7.0, 1.6.3
>
>         Attachments: JCLOUDS-405.patch
>
>
> The HttpURLConnection class does not allow to directly set the PATCH request 
> method. To set it, one needs to use reflection and manually set the value of 
> the *method* field.
> However, in HTTPS connections, the target HttpURLConnection is wrapped in a 
> *delegate* field, and the reflection workaround does not take effect unless 
> the method is also set in the *delegate*.
> See:
> https://java.net/jira/browse/JERSEY-639
> https://github.com/jersey/jersey/pull/45



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to