{"action":"closed","issue":{"url":"https://api.github.com/repos/square/okhttp/issues/1919","labels_url":"https://api.github.com/repos/square/okhttp/issues/1919/labels{/name}","comments_url":"https://api.github.com/repos/square/okhttp/issues/1919/comments","events_url":"https://api.github.com/repos/square/okhttp/issues/1919/events","html_url":"https://github.com/square/okhttp/issues/1919","id":110873286,"number":1919,"title":"redirect for PROFIND request issues GET request","user":{"login":"rburgst","id":22971,"avatar_url":"https://avatars.githubusercontent.com/u/22971?v=3","gravatar_id":"","url":"https://api.github.com/users/rburgst","html_url":"https://github.com/rburgst","followers_url":"https://api.github.com/users/rburgst/followers","following_url":"https://api.github.com/users/rburgst/following{/other_user}","gists_url":"https://api.github.com/users/rburgst/gists{/gist_id}","starred_url":"https://api.github.com/users/rburgst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rburgst/subscriptions","organizations_url":"https://api.github.com/users/rburgst/orgs","repos_url":"https://api.github.com/users/rburgst/repos","events_url":"https://api.github.com/users/rburgst/events{/privacy}","received_events_url":"https://api.github.com/users/rburgst/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/square/okhttp/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/square/okhttp/milestones/14","html_url":"https://github.com/square/okhttp/milestones/2.6","labels_url":"https://api.github.com/repos/square/okhttp/milestones/14/labels","id":1236313,"number":14,"title":"2.6","description":"","creator":{"login":"swankjesse","id":133019,"avatar_url":"https://avatars.githubusercontent.com/u/133019?v=3","gravatar_id":"","url":"https://api.github.com/users/swankjesse","html_url":"https://github.com/swankjesse","followers_url":"https://api.github.com/users/swankjesse/followers","following_url":"https://api.github.com/users/swankjesse/following{/other_user}","gists_url":"https://api.github.com/users/swankjesse/gists{/gist_id}","starred_url":"https://api.github.com/users/swankjesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swankjesse/subscriptions","organizations_url":"https://api.github.com/users/swankjesse/orgs","repos_url":"https://api.github.com/users/swankjesse/repos","events_url":"https://api.github.com/users/swankjesse/events{/privacy}","received_events_url":"https://api.github.com/users/swankjesse/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":18,"state":"closed","created_at":"2015-08-01T17:42:31Z","updated_at":"2015-12-12T02:09:23Z","due_on":"2015-11-16T05:00:00Z","closed_at":"2015-11-22T17:37:25Z"},"comments":4,"created_at":"2015-10-11T18:13:24Z","updated_at":"2015-12-12T02:09:23Z","closed_at":"2015-12-12T02:09:23Z","body":"see code in `com.squareup.okhttp.internal.http.HttpEngine#followUpRequest`\r\n\r\n```java\r\n      case HTTP_MULT_CHOICE:\r\n      case HTTP_MOVED_PERM:\r\n      case HTTP_MOVED_TEMP:\r\n      case HTTP_SEE_OTHER:\r\n        // Does the client allow redirects?\r\n        if (!client.getFollowRedirects()) return null;\r\n\r\n        String location = userResponse.header(\"Location\");\r\n        if (location == null) return null;\r\n        HttpUrl url = userRequest.httpUrl().resolve(location);\r\n\r\n        // Don't follow redirects to unsupported protocols.\r\n        if (url == null) return null;\r\n\r\n        // If configured, don't follow redirects between SSL and non-SSL.\r\n        boolean sameScheme = url.scheme().equals(userRequest.httpUrl().scheme());\r\n        if (!sameScheme && !client.getFollowSslRedirects()) return null;\r\n\r\n        // Redirects don't include a request body.\r\n        Request.Builder requestBuilder = userRequest.newBuilder();\r\n        if (HttpMethod.permitsRequestBody(userRequest.method())) {\r\n          requestBuilder.method(\"GET\", null);\r\n          requestBuilder.removeHeader(\"Transfer-Encoding\");\r\n          requestBuilder.removeHeader(\"Content-Length\");\r\n          requestBuilder.removeHeader(\"Content-Type\");\r\n        }\r\n```\r\n\r\nThus, any http body is lost and out of a PROFIND request I get a GET request instead.\r\n\r\nIMHO we need a more flexible solution for coming up with a redirected request. For PROPFIND, the redirected request should again be PROPFIND and the HTTP body should be maintained."}}