> -----Original Message-----
> From: Stefan Eissing [mailto:[email protected]]
> Sent: donderdag 10 december 2015 11:47
> To: [email protected]
> Subject: Re: Upgrade Summary
>
> Given all the input on this thread, I arrive at the following pseudo code:
>
> 1. Post Read Request Hook:
>
> if (Upgrade: request header present) {
> collect protocol proposals;
> ps = protocol with highest preference from proposals;
> if (ps && ps != current) {
> status = switch protocol(phase => post_read);
> if (status == APR_EOF) {
> close connection;
> }
> else if (status == APR_EAGAIN) {
> // protocol switch wants to be called later
> before handler
> if (request is "OPTIONS *") {
> // TODO: invoke again with (phase =>
> handler)?
Why handle 'OPTIONS *' different here?
Isn't that 'just another simple HTTP/1.1 request'?
>From what I read about that request, it is a recommended easy request if you
don't have anything to send yourself in this stage. (With "HEAD /" as
alternative).
If not required I would recommend not hardcoding specific behavior on this
request. There is not much that makes it that different from "GET /" or
"HEAD /", or every other request that doesn't have a request body.
Bert