Yes, you are correct. Had not covered that test in my test suite... Fixed in r1740119.
Thanks! -Stefan > Am 20.04.2016 um 13:24 schrieb Michael Kaufmann <[email protected]>: > >> Done in r1740075. >> > > I think that commit introduced a small bug, because the "for" loop is left > when "h2" is seen and "report_all" is false. There may be other protocols > that are more preferred than the current one. > > > Suggested change: > > Index: server/protocol.c > =================================================================== > --- server/protocol.c (revision 1740112) > +++ server/protocol.c (working copy) > @@ -2017,15 +2017,18 @@ > * existing. (TODO: maybe 426 and Upgrade then?) */ > upgrades = apr_array_make(pool, conf->protocols->nelts + 1, > sizeof(char *)); > for (i = 0; i < conf->protocols->nelts; i++) { > const char *p = APR_ARRAY_IDX(conf->protocols, i, char *); > /* special quirk for HTTP/2 which does not allow 'h2' to > * be part of an Upgrade: header */ > - if (strcmp(existing, p) && strcmp("h2", p)) { > + if (!strcmp("h2", p)) { > + continue; > + } > + if (strcmp(existing, p)) { > /* not the one we have and possible, add in this order */ > APR_ARRAY_PUSH(upgrades, const char*) = p; > } > else if (!report_all) { > break; > } > } > > > Regards, > Michael >
