+1. Being strict. No need to flood the logs
Arturo On Sat, Oct 12, 2024 at 3:14 PM Oleg Kalnichevski <ol...@apache.org> wrote: > On Sat, 2024-10-12 at 07:43 -0400, Gary Gregory wrote: > > I think the remaining decisions are: > > > > - whether we should log a warning (but not throw an exception) when > > both > > are present and equal. > > - what to do if both are present but not equal, at least log a > > warning, but > > not throw an exception because of the SHOULD? > > > > Logging a warning on a per request basis would likely flood the logs > and upset quite a few people. It would upset me. > > I propose we follow the same philosophy as always: be strict as a > producer and be lenient as a consumer specially where the spec is > ambiguous or permissive as in this case. > > Oleg > > > > Gary > > > > On Sat, Oct 12, 2024, 7:17 AM Oleg Kalnichevski <ol...@apache.org> > > wrote: > > > > > On Sat, 2024-10-12 at 07:04 -0400, Gary Gregory wrote: > > > > Hi all, > > > > > > > > Considering the text you quote and the SHOULD definition in > > > > https://datatracker.ietf.org/doc/html/rfc2119#section-3 then we > > > > are > > > > indeed > > > > in the wrong (IMO) and we need to allow for the Host header to be > > > > processed > > > > in the absence of the ":authority" pseudo-header. > > > > > > > > > > For some reason HTTPD sends both. This is bizarre. > > > > > > Oleg > > > > > > > > > > Gary > > > > > > > > > > > > On Sat, Oct 12, 2024, 6:47 AM Oleg Kalnichevski > > > > <ol...@apache.org> > > > > wrote: > > > > > > > > > Folks > > > > > > > > > > Presently HttpCore HTTP/2 protocol handler treats HTTP/2 > > > > > request > > > > > messages with a `Host` header as malformed. > > > > > > > > > > However I just recently discovered that Apache HTTPD happily > > > > > sends > > > > > us > > > > > push promise requests with a `Host` header in them. Initially I > > > > > thought > > > > > it was a bug in HTTPD and was going to report it to the HTTPD > > > > > devs. > > > > > However I have gone through RFC 7540 a few more times I must > > > > > admit > > > > > there appears to be no clear statement defining `Host` header > > > > > as > > > > > illegal for HTTP/2 messages. There is only this: "Clients that > > > > > generate > > > > > HTTP/2 requests directly SHOULD use the ":authority" pseudo- > > > > > header > > > > > field instead of the Host header field". > > > > > > > > > > It looks like we are in the wrong here. > > > > > > > > > > How do you see it? > > > > > > > > > > Oleg > > > > > > > > > > --- > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 >> :method: GET > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 >> :scheme: http > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 >> :authority: localhost:32916 > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 >> :path: /pushy > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 >> user-agent: Apache-HttpCore/5.3.1-SNAPSHOT > > > > > (Java/17.0.12) > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http2.frame] > > > > > c- > > > > > 0000000000 > > > > > > > stream 1 frame: HEADERS (0x1); flags: END_STREAM > > > > > > > END_HEADERS > > > > > > > (0x5); > > > > > length: 59 > > > > > ... > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http2.frame] > > > > > c- > > > > > 0000000000 > > > > > << stream 1 frame: PUSH_PROMISE (0x5); flags: END_HEADERS > > > > > (0x4); > > > > > length: 77 > > > > > DEBUG [requester-dispatch- > > > > > 1][org.apache.hc.core5.http2.frame.payload] > > > > > c-0000000000 << Promised stream 2 > > > > > ... > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 << :scheme: http > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 << :authority: localhost:32916 > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 << :path: /aaa > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 << :method: GET > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 << user-agent: Apache-HttpCore/5.3.1-SNAPSHOT > > > > > (Java/17.0.12) > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 << host: localhost:32916 > > > > > ... > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 << :status: 200 > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 << last-modified: Sat, 12 Oct 2024 10:33:15 GMT > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 << etag: "15-624452194b0c0" > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 << accept-ranges: bytes > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 << content-length: 21 > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 << date: Sat, 12 Oct 2024 10:33:18 GMT > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http.headers] > > > > > c-0000000000 << server: Apache/2.4.54 (Unix) > > > > > DEBUG [requester-dispatch-1][org.apache.hc.core5.http2.frame] > > > > > c- > > > > > 0000000000 > > > > > << stream 1 frame: DATA (0x0); flags: END_STREAM (0x1); length: > > > > > 21 > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------- > > > > > ---- > > > > > -- > > > > > To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org > > > > > For additional commands, e-mail: dev-h...@hc.apache.org > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------- > > > -- > > > To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org > > > For additional commands, e-mail: dev-h...@hc.apache.org > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org > For additional commands, e-mail: dev-h...@hc.apache.org > >