On Thu, Mar 5, 2015 at 9:38 AM, Ruediger Pluem <[email protected]> wrote: > > Don't we need to have the following in addition to avoid a crash in another > path? > > > Index: protocol.c > =================================================================== > --- protocol.c (revision 1664261) > +++ protocol.c (working copy) > @@ -674,6 +674,8 @@ > ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02418) > "Invalid protocol '%s'", r->protocol); > if (enforce_strict) { > + r->protocol = apr_pstrdup(r->pool, "HTTP/1.0"); > + r->proto_num = HTTP_VERSION(1,0); > r->status = HTTP_BAD_REQUEST; > return 0; > } >
r->protocol is initialized above in any case (with an invalid value but it is), so it won't crash. But r->proto_num is still 0 (which, if I read output filter chain correctly, will lead to a HTTP/1.1 response), though. So we probably should keep the original value in r->protocol (for logging), but force proto_num = HTTP_VERSION(1,0). Regards, Yann.
