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

is-on-https: check record.protocol for blob urls #2538

Merged
merged 1 commit into from
Jun 19, 2017
Merged

is-on-https: check record.protocol for blob urls #2538

merged 1 commit into from
Jun 19, 2017

Conversation

ebidel
Copy link
Contributor

@ebidel ebidel commented Jun 19, 2017

Fixes #2523.

Adds an additional check for the protocol/scheme. FWIW, record.scheme isn't populated for blob: urls but .protocol is!

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah oops, guess I should always throw a smoke test in there for these huh? :)

I can't remember the site I was testing on that started working though, strange...

@paulirish paulirish merged commit 72cc7da into master Jun 19, 2017
@paulirish paulirish deleted the 2523 branch June 19, 2017 18:51
function isOnHttps() {
// Check blob URL.
const img = document.createElement('img');
img.src = URL.createObjectURL(blob);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ebidel I don't think this is actually working? Uncaught ReferenceError: blob is not defined.

The expectation after this change should have length: 2 (the current extendedInfo has http://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js in it, not the blob URL)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Yea the smoketest wasn't testing anything. Bug prevented the image from being aded to the DOM.
Will fix.

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

Successfully merging this pull request may close these issues.

None yet

4 participants