Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix($http): don't run transformData on HEAD methods #9529

Closed
wants to merge 1 commit into from

Conversation

tbosch
Copy link
Contributor

@tbosch tbosch commented Oct 9, 2014

7b6c1d0 created this issue by using Content-Type to
determine when to run fromJson. Because HEAD methods do not contain
a body but are supposed to return the Content-Type header that would
have been returned if it was a GET this functionality fails.

Closes #9528

@mary-poppins
Copy link

I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS.

Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match.

If you signed the CLA as a corporation, please let us know the company's name.

Thanks a bunch!

PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR.
PS2: If you are a Googler, please sign the CLA as well to simplify the CLA verification process.

7b6c1d0 created this issue by using `Content-Type` to
determine when to run `fromJson`.  Because `HEAD` methods do not contain
a body but are supposed to return the `Content-Type` header that would
have been returned if it was a `GET` this functionality fails.

Closes angular#9528
@IgorMinar
Copy link
Contributor

There is a related issue: #9532 which describes the same kind of error because server responded with HTTP 204 No Content.

We should change the PR to simply not parse the response if it's empty.

@tbosch tbosch closed this Oct 10, 2014
@tbosch tbosch deleted the pr/9528 branch October 10, 2014 16:54
tbosch pushed a commit that referenced this pull request Oct 10, 2014
7b6c1d0 created this issue by using `Content-Type` to
determine when to run `fromJson`.  Because `HEAD` methods do not contain
a body but are supposed to return the `Content-Type` header that would
have been returned if it was a `GET` this functionality fails.

Closes #9528
Closes #9529
@tbosch
Copy link
Contributor Author

tbosch commented Oct 10, 2014

Haven't seen your comment, will create a new PR for #9532

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants