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

Changed Upgrade from $ to [[, as $ is prefix based #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leibnitz27
Copy link

Chrome, since 44.0.2403.130, adds Upgrade-Insecure-Headers to basic http (NOT websocket) requests.

Previously, checks that a request was NOT a websocket upgrade were performed with

  # Web request
  if (is.null(J$wsinfo$Upgrade)) {
    # Not a handshake request, serve a static web page

Because R allows for prefix matching when performing $ lookups, this means the presence of Upgrade-Insecure-Headers fools R-Websockets into considering ALL requests to be websocket upgrades.

Use an exact match, via [["Upgrade"]] instead.

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.

1 participant