Added check for the correct content type in addition to the response status code. #23

Merged
merged 1 commit into from Jun 21, 2016

Conversation

Projects
None yet
2 participants
@mikeflynn
Collaborator

mikeflynn commented Jun 18, 2016

I recently experienced an issue where the CA functionality was broken because Mozilla has a maintenance page up for the CA link in the code (https://mxr.mozilla.org/nss/source/lib/ckfw/builtins/certdata.txt?raw=1) and unfortunately that maintenance page returns a 200 status. That means the HTML page was being downloaded as the CA, which didn't exactly work super well.

My change adds an additional check for the content type to be text/plain in addition to the status code check.

@coolaj86

This comment has been minimized.

Show comment
Hide comment
@coolaj86

coolaj86 Jun 21, 2016

Contributor

I added you to the repo. Merge and test and let me know when to pull and republish.

I can add you to npm so you can publish yourself if you give me your npm username.

Contributor

coolaj86 commented Jun 21, 2016

I added you to the repo. Merge and test and let me know when to pull and republish.

I can add you to npm so you can publish yourself if you give me your npm username.

@coolaj86 coolaj86 merged commit 10b1d7a into Daplie:master Jun 21, 2016

@mikeflynn

This comment has been minimized.

Show comment
Hide comment
@mikeflynn

mikeflynn Jun 22, 2016

Collaborator

Thanks for the merge. Sorry I didn't get to it when you first added me, but I've been away a bit and just now circling back.

Collaborator

mikeflynn commented Jun 22, 2016

Thanks for the merge. Sorry I didn't get to it when you first added me, but I've been away a bit and just now circling back.

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