Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpResponse.parseAs(..) should return null for HTTP Status "204 No Content" #135

Closed
wonderfly opened this issue Jan 9, 2015 · 1 comment
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@wonderfly
Copy link
Contributor

From mlin...@google.com on June 27, 2012 13:08:53

When the deprecated HttpParsers are being used, and no content-type is specified, the .parseAs() method would fail with an IllegalArgumentException. In case an ObjectParser was specified, the underlying parser would also most likely fail with a similar exception.

However, the documentation of that method states that 'null' would be returned when no content was present. We should at least return null when we can be sure that there is no content (e.g. when the HttpStatusCode is '204 No Content') instead of throwing an exception.

Original issue: http://code.google.com/p/google-http-java-client/issues/detail?id=135

@wonderfly wonderfly added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. imported priority: p2 Moderately-important priority. Fix may not be included in next release. labels Jan 9, 2015
@wonderfly wonderfly self-assigned this Jan 9, 2015
@wonderfly
Copy link
Contributor Author

From mlin...@google.com on July 09, 2012 15:16:55

Status: Fixed

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 6, 2020
clundin25 pushed a commit to clundin25/google-http-java-client that referenced this issue Aug 11, 2022
The PR to bump the version to 0.8.0
(googleapis/google-auth-library-java#126)
was not merged before additional commits were merged, so it had to
be closed out. This PR bumps to the proper SNAPSHOT version for the
next release. Commit 0fab63c corresponds to the actual 0.8.0 release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants