Title: Response body not closed in redirect handler when downloading content from sharepoint · Issue #138 · microsoftgraph/msgraph-sdk-java-core · GitHub
Open Graph Title: Response body not closed in redirect handler when downloading content from sharepoint · Issue #138 · microsoftgraph/msgraph-sdk-java-core
X Title: Response body not closed in redirect handler when downloading content from sharepoint · Issue #138 · microsoftgraph/msgraph-sdk-java-core
Description: Exception Caused by: java.lang.IllegalStateException: null at okhttp3.internal.connection.Transmitter.prepareToConnect(Transmitter.java:129) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:...
Open Graph Description: Exception Caused by: java.lang.IllegalStateException: null at okhttp3.internal.connection.Transmitter.prepareToConnect(Transmitter.java:129) at okhttp3.internal.http.RetryAndFollowUpInterceptor.int...
X Description: Exception Caused by: java.lang.IllegalStateException: null at okhttp3.internal.connection.Transmitter.prepareToConnect(Transmitter.java:129) at okhttp3.internal.http.RetryAndFollowUpInterceptor.int...
Opengraph URL: https://github.com/microsoftgraph/msgraph-sdk-java-core/issues/138
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Response body not closed in redirect handler when downloading content from sharepoint","articleBody":"### Exception\r\nCaused by: java.lang.IllegalStateException: null\r\n at okhttp3.internal.connection.Transmitter.prepareToConnect(Transmitter.java:129)\r\n at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:79)\r\n at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)\r\n at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)\r\n at com.microsoft.graph.httpcore.RedirectHandler.intercept(RedirectHandler.java:123)\r\n at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)\r\n at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)\r\n at com.microsoft.graph.httpcore.RetryHandler.intercept(RetryHandler.java:140)\r\n at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)\r\n at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)\r\n at com.microsoft.graph.httpcore.AuthenticationHandler.intercept(AuthenticationHandler.java:31)\r\n at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)\r\n at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)\r\n at com.microsoft.graph.httpcore.TelemetryHandler.intercept(TelemetryHandler.java:37)\r\n at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)\r\n at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)\r\n\r\n\r\n### Cause\r\n* Sharepoint API 'sometime' return back response for 302 redirect call without \"Content-Length\" and with \"Transfer-Encoding: chunked\"\r\n* Above cause, `responseBody close` call skip as content-length would be set as -1.\r\n* Subsequent request fail with above exception \r\n\r\n### Expected behavior\r\n* WHEN RESPONSE HAS NO BODY BYTES, USE 'CONTENT-LENGTH: 0' RATHER THAN 'TRANSFER-ENCODING: CHUNKED' for 302 re-direct call\r\n\r\n### SDK Version\r\n\u003cmicrosoft-graph.version>2.5.0\u003c/microsoft-graph.version>\r\n\u003cmicrosoft-graph-auth.version>0.2.0\u003c/microsoft-graph-auth.version>\r\n \r\n\r\n\r\n \r\n[AB#8012](https://microsoftgraph.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_workitems/edit/8012)","author":{"url":"https://github.com/milapshahot","@type":"Person","name":"milapshahot"},"datePublished":"2021-02-05T06:12:07Z","url":"https://github.com/microsoftgraph/msgraph-sdk-java-core/issues/138"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fed3ac0c-b424-5005-a2db-a0e82e1abd4c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EAC8:2867F2:78CC1B:A27B8A:6B053096 |
| html-safe-nonce | 6862c439162419562f87e126fa00eaf4dfeb2668df48d3b3c62f05c47bc6ced9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUM4OjI4NjdGMjo3OENDMUI6QTI3QjhBOjZCMDUzMDk2IiwidmlzaXRvcl9pZCI6IjE4MDc5OTM5Mjk4ODc3MjM2NzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 14bcdde71bb6ab4dc8e43d8452ef345850ab49e9af71aef668b521ab75fcf184 |
| hovercard-subject-tag | issue:803983625 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoftgraph/msgraph-sdk-java-core/138/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7560014dabb771c97186faec56668e0f38597f10d555b22c3f8432919a98278d/microsoftgraph/msgraph-sdk-java-core/issues/138 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7560014dabb771c97186faec56668e0f38597f10d555b22c3f8432919a98278d/microsoftgraph/msgraph-sdk-java-core/issues/138 |
| og:image:alt | Exception Caused by: java.lang.IllegalStateException: null at okhttp3.internal.connection.Transmitter.prepareToConnect(Transmitter.java:129) at okhttp3.internal.http.RetryAndFollowUpInterceptor.int... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | milapshahot |
| hostname | github.com |
| expected-hostname | github.com |
| None | 854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoftgraph/msgraph-sdk-java-core git https://github.com/microsoftgraph/msgraph-sdk-java-core.git |
| octolytics-dimension-user_id | 17304259 |
| octolytics-dimension-user_login | microsoftgraph |
| octolytics-dimension-repository_id | 154607328 |
| octolytics-dimension-repository_nwo | microsoftgraph/msgraph-sdk-java-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 154607328 |
| octolytics-dimension-repository_network_root_nwo | microsoftgraph/msgraph-sdk-java-core |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 220e980097d94ce616d5d11fbd5316d208e3fc93 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width