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

Issue #400 - Added null check to glimpse.hud.js > processContentType function #401

Merged
merged 1 commit into from Jun 25, 2013

Conversation

Projects
None yet
2 participants
@ScottGuymer
Contributor

ScottGuymer commented Jun 21, 2013

Updating the HUD with an AJAX request that has not content-type set causes the following error

Uncaught TypeError: Cannot call method 'indexOf' of null

Added a null check to return an empty string if no content-type header is set.

Added null check when processing content-type header
Updating the HUD with an AJAX request that has not content-type set causes the following error
 
Uncaught TypeError: Cannot call method 'indexOf' of null 

This is because type is not defined.

This was occurring when a server responded with a HTTP 204 and did not return a content-type header.
@avanderhoorn

This comment has been minimized.

Show comment
Hide comment
@avanderhoorn

avanderhoorn Jun 22, 2013

Member

Looks good. I never thought about the content being null, so good fix. Lastly, so that we can pull in the contribution, could you sign this document and send it through to anthony dot vanderhoorn at where the google mail lives :)

Member

avanderhoorn commented Jun 22, 2013

Looks good. I never thought about the content being null, so good fix. Lastly, so that we can pull in the contribution, could you sign this document and send it through to anthony dot vanderhoorn at where the google mail lives :)

@ScottGuymer

This comment has been minimized.

Show comment
Hide comment
@ScottGuymer

ScottGuymer Jun 24, 2013

Contributor

I've sent over the document.

The only reason i noticed it was that i have a function that captures uncaught exceptions and reports then to the server which returns no content, which caused an uncaught exception. You can see where I'm going with this?? Chaos!

Contributor

ScottGuymer commented Jun 24, 2013

I've sent over the document.

The only reason i noticed it was that i have a function that captures uncaught exceptions and reports then to the server which returns no content, which caused an uncaught exception. You can see where I'm going with this?? Chaos!

avanderhoorn added a commit that referenced this pull request Jun 25, 2013

Merge pull request #401 from ScottGuymer/master
Issue #400 - Added null check to glimpse.hud.js > processContentType function

@avanderhoorn avanderhoorn merged commit 13f5452 into Glimpse:master Jun 25, 2013

1 check passed

default TeamCity Build Glimpse :: Continuous Integration finished: Tests passed: 942, ignored: 10
Details
@avanderhoorn

This comment has been minimized.

Show comment
Hide comment
@avanderhoorn

avanderhoorn Jun 25, 2013

Member

Thanks for sending that through and for the great commit.

Member

avanderhoorn commented Jun 25, 2013

Thanks for sending that through and for the great commit.

@ghost ghost assigned avanderhoorn Jun 25, 2013

@avanderhoorn

This comment has been minimized.

Show comment
Hide comment
@avanderhoorn

avanderhoorn Jun 25, 2013

Member

For the record, this fixes #400

Member

avanderhoorn commented Jun 25, 2013

For the record, this fixes #400

avanderhoorn added a commit that referenced this pull request Jun 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment