httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@gbiv.com>
Subject Re: HTTP_MISDIRECTED_REQUEST
Date Fri, 28 Aug 2015 01:37:45 GMT
> On Aug 26, 2015, at 3:15 PM, William A Rowe Jr <wrowe@rowe-clan.net <mailto:wrowe@rowe-clan.net>>
wrote:
> 
> Should this exception have a protocol version guard for HTTP/2.0 requests, and leave
the response as HTTP_BAD_REQUEST for HTTP/1.1 and earlier?
> 
> @@ -203,6 +204,9 @@
>                  ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(02032)
>                              "Hostname %s provided via SNI and hostname %s provided"
>                              " via HTTP are different", servername, host);
> +                if (r->connection->keepalives > 0) {
> +                    return HTTP_MISDIRECTED_REQUEST;
> +                }
>                  return HTTP_BAD_REQUEST;
>              }
>          }

IIRC, it is applicable to HTTP/1.1 as well. Think misdirected requests containing
an absolute request URI that points to some other server.  I don't think the conditional
is needed at all -- just return HTTP_MISDIRECTED_REQUEST.

Hmm, I wonder how this impacts Google's desire to allow multiple hosts to reuse
the same SPDY connection ... was that dropped for h2?

....Roy

Mime
View raw message