PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) Propose we apr_pstrdup constant r->protocol assignments, and always fail
- entirely invalid protocols (expecting these are part two of a URL with
- embedded raw SP characters), without considering 'strict'-ness.
- Backports: r1773159 through merge branch commit r1773161
- Trunk patch:
- https://svn.apache.org/r1773159
- 2.4.x patch:
- https://svn.apache.org/r1773161
- +1: wrowe, jim, ylavic
-
*) With oddball whitespace now disallowed, strictness makes no difference
in the two cases of field content handling. Noted by rpluem.
Backports: r1773162 through merge branch commit r1773163
memcpy((char*)r->protocol, "HTTP", 4);
}
else if (r->protocol[0]) {
- r->assbackwards = 0;
- r->proto_num = HTTP_VERSION(1,0);
+ r->proto_num = HTTP_VERSION(0, 9);
/* Defer setting the r->protocol string till error msg is composed */
- if (strict && deferred_error == rrl_none)
+ if (deferred_error == rrl_none)
deferred_error = rrl_badprotocol;
- else
- r->protocol = "HTTP/1.0";
}
else {
r->assbackwards = 1;
- r->protocol = "HTTP/0.9";
+ r->protocol = apr_pstrdup(r->pool, "HTTP/0.9");
r->proto_num = HTTP_VERSION(0, 9);
}
r->assbackwards = 0;
r->connection->keepalive = AP_CONN_CLOSE;
r->proto_num = HTTP_VERSION(1, 0);
- r->protocol = "HTTP/1.0";
+ r->protocol = apr_pstrdup(r->pool, "HTTP/1.0");
}
return 0;
}