Simon's not on the mailing list so here's his response to me.
---------- Forwarded message ----------
From: Simon Urbanek <
simon....@r-project.org>
Date: Mon, May 6, 2013 at 12:20 PM
Subject: Re: [Rook] Rhttpd hangs when POST data is empty (#6)
To: Jeffrey Horner <
jeffrey...@gmail.com>
Cc: jeffreyhorner/Rook
<
reply+i-11377476-8c4e81f3f99a326...@reply.github.com>
On May 6, 2013, at 11:40 AM, Jeffrey Horner wrote:
> Simon is there a way to get the first line of HTTP protocol information to the R user?
>
Not currently. Note that the internal httpd was intended solely for
the help system so it's not designed to be general-purpose server. It
doesn't handle anything beyond HEAD/GET/POST anyway. To be honest, I'd
much rather have Rook use the HTTP server in Rserve instead which
could be more easily extended (since R doesn't rely on it internally),
supports HTTPS and doesn't suffer from the limitations in the built-in
one (serial processing, mashing into the event loop etc.). But we
could talk about what is needed.
I don't follow the original discussion, but if what Jeroen refers to
is a bug in the Rhttpd please let me know and I'll have a look.
Cheers,
Simon
>
> On Mon, May 6, 2013 at 1:41 AM, Jeroen <
notifi...@github.com> wrote:
> I am going to guess this is related to the following line in Rhttpd.R:
>
> assign('REQUEST_METHOD',ifelse(is.null(postBody),'GET','POST'),env)
>
> This is due to a design flaw in the R build-in http server in R. For some reason they decided to not include the http method in the handler signature. See this paper for more details.
>
> The workaround chooses between GET or POST based on the presence of a request body. However this method is far from flawless of course. A body can be present for POST as well as PUT, but is optional. When no body is present, any method could have been used.
>
> —
> Reply to this email directly or view it on GitHub.
>
>