-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Firefox, RStudio Server, and latest Shiny/httpuv don't work together #2940
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
Comments
jmcphers
added a commit
that referenced
this issue
Jun 8, 2018
jcheng5
added a commit
to rstudio/httpuv
that referenced
this issue
Jun 8, 2018
…esent This is a workaround for rstudio/rstudio#2940. It stops an erroneously sent "Connection: close" header from breaking an otherwise legit websocket request.
jcheng5
added a commit
to rstudio/httpuv
that referenced
this issue
Jun 8, 2018
…esent This is a workaround for rstudio/rstudio#2940. It stops an erroneously sent "Connection: close" header from breaking an otherwise legit websocket request.
This was referenced Jun 8, 2018
Merged
jcheng5
added a commit
to rstudio/httpuv
that referenced
this issue
Jun 8, 2018
…esent This is a workaround for rstudio/rstudio#2940. It stops an erroneously sent "Connection: close" header from breaking an otherwise legit websocket request.
jmcphers
added a commit
that referenced
this issue
Jun 21, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TL;DR: This line doesn't account for the fact that some browsers send
Connection: Upgrade
and others (Firefox) sendConnection: keep-alive, Upgrade
.With the combination of httpuv 1.4.x, RStudio Server, and Firefox, running Shiny apps through the session proxy doesn't work. The problem is fixed if you change ANY of those three though (switching to older httpuv, OR RStudio Desktop, OR Chrome all fix it).
The problem is with the HTTP request that initiates a WebSocket connection, and specifically, with that request's Connection header. Chrome sends
Connection: Upgrade
, while Firefox sendsConnection: keep-alive, Upgrade
. RFC 6455 page 17 says:so both browsers are passing legal values.
However, RStudio Server's proxy logic assumes that the incoming request's Connection header must be equal to "Upgrade" to be considered an upgrade, and if it is not, it changes the header to
Connection: close
before sending upstream to httpuv.httpuv <1.4 doesn't care if
Connection: close
, it allows a websocket connection anyway. That's why it can work with either Firefox or Chrome. But httpuv 1.4.x looks forConnection: Upgrade
, so it doesn't work with Firefox.System details
Steps to reproduce the problem
shiny::runExample("01_hello")
, and let new browser window launchDescribe the problem in detail
The app's page goes grey immediately
Describe the behavior you expected
The app should work correctly
(cc @wch)
The text was updated successfully, but these errors were encountered: