Closed GoogleCodeExporter closed 9 years ago
Hi, we recently uncovered this issue internally but just haven't updated the
documentation yet.
You are getting a null response with 401 when doing a POST/PUT using the
NetHttpTransport. This is a working an intended (or a bug I would say) of the
underlining un.net.www.protocol.http.HttpURLConnection class
(http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8-b132/s
un/net/www/protocol/http/HttpURLConnection.java#1633). It closes/clears the
connection immediately when receiving a 401/407 in streaming mode.
NetHttpResponse.getContent()
(https://code.google.com/p/google-http-java-client/source/browse/google-http-cli
ent/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java#75)
would always fail in these cases because both the inputStream and errorStream
are empty.
There's not much we can do on this matter, but an easy work around is to use
ApacheHttpTransport.
(https://code.google.com/p/google-http-java-client/source/browse/google-http-cli
ent/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java)
Original comment by wonder...@google.com
on 22 Aug 2014 at 6:14
Original comment by wonder...@google.com
on 29 Oct 2014 at 10:17
{ "error": { "errors": [{ "domain": "androidpublisher", "reason": "permissionDenied", "message": "The current user has insufficient permissions to perform the requested operation." }], "code": 401, "message": "The current user has insufficient permissions to perform the requested operation." } }
Original issue reported on code.google.com by
chris@orr.me.uk
on 19 Aug 2014 at 1:19