output_full:
/* The connection header values may have been cleaned up, so the
- * corresponding flags must be preserved for the next parsing.
+ * corresponding flags must be preserved for the next parsing. The
+ * version flag is preserved for consistency with the restart of the
+ * parsing in h1_headers_to_hdr_list().
*/
- flags = h1m->flags & (H1_MF_CONN_CLO|H1_MF_CONN_KAL);
+ flags = h1m->flags & (H1_MF_CONN_CLO|H1_MF_CONN_KAL|H1_MF_VER_11);
lenient = (h1m->err_pos >= -1);
h1m_init_req(h1m);
h1m->flags |= (H1_MF_NO_PHDR|H1_MF_CLEAN_CONN_HDR|flags);
output_full:
/* The connection header values may have been cleaned up, so the
- * corresponding flags must be preserved for the next parsing.
+ * corresponding flags must be preserved for the next parsing. The
+ * flags set by the mux from the request (version, HEAD or CONNECT
+ * method) must also be preserved: there is no start line in a FCGI
+ * response, so they are never re-set by the parsing in this case.
*/
- flags = h1m->flags & (H1_MF_CONN_CLO|H1_MF_CONN_KAL);
+ flags = h1m->flags & (H1_MF_CONN_CLO|H1_MF_CONN_KAL|H1_MF_VER_11|
+ H1_MF_METH_HEAD|H1_MF_METH_CONNECT);
lenient = (h1m->err_pos >= -1);
h1m_init_res(h1m);
h1m->flags |= (H1_MF_NO_PHDR|H1_MF_CLEAN_CONN_HDR|flags);