Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Added check for the correct content type in addition to the response status code. #23
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.