Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update NetHttpRequest to prevent silent retry of DELETE requests (…
…#1472) HttpURLConnection will silently retry `DELETE` requests. This behavior is similar to other existing JDK bugs (JDK-6382788, JDK-6427251). google-http-java-client already contains a workaround for POST and PUT requests NetHttpRequest.java#L108-L112, but does not account for `DELETE` with an empty body. This change adds handling for DELETE to leverage the same workaround as POST and PUT.  https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6382788  https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6427251 Fixes #1471
- Loading branch information
Showing with 40 additions and 0 deletions.
- +3 −0 google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java
- +24 −0 ...e-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java
- +13 −0 google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java