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

RStudio crashes when on("request") doesn't return the expected HTTP response list #4

Closed
daattali opened this issue Aug 9, 2016 · 4 comments

Comments

@daattali
Copy link

daattali commented Aug 9, 2016

Consider the following simple GET listener

library(fiery)
app <- Fire$new()
app$port <- 9000
app$host <- "127.0.0.1"

app$on('request', function(server, id, request, ...) {
  if (request$REQUEST_METHOD == "GET") {
    list(
      status = 200L,
      headers = list('Content-Type' = 'text/html'),
      body = paste('Get it!')
    )
  }
})

app$start(block = FALSE)

If you ping this URL with any request that is not a GET, my RStudio crashes. I'm on Windows 7.

@thomasp85
Copy link
Owner

Have you installed the latest from GitHub. It should default to a 404 response... Will check it out later

@daattali
Copy link
Author

daattali commented Aug 9, 2016

Sorry, no I haven't, I definitely should have tried that before submitting
a bug. I'll check right now


http://deanattali.com

On 9 August 2016 at 00:27, Thomas Lin Pedersen notifications@github.com
wrote:

Have you installed the latest from GitHub. It should default to a 404
response... Will check it out later


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#4 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA6IFF_ySJ0kQYnz-bDpw_bZC7iCiNg5ks5qeCvjgaJpZM4JfyXm
.

@daattali
Copy link
Author

daattali commented Aug 9, 2016

Just installed latest version from github v0.2.2 , still crashing


http://deanattali.com

On 9 August 2016 at 00:28, Dean Attali daattali@gmail.com wrote:

Sorry, no I haven't, I definitely should have tried that before submitting
a bug. I'll check right now


http://deanattali.com

On 9 August 2016 at 00:27, Thomas Lin Pedersen notifications@github.com
wrote:

Have you installed the latest from GitHub. It should default to a 404
response... Will check it out later


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#4 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA6IFF_ySJ0kQYnz-bDpw_bZC7iCiNg5ks5qeCvjgaJpZM4JfyXm
.

@thomasp85
Copy link
Owner

Ok, I'll look into it

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

No branches or pull requests

2 participants