2.2.x patch: http://people.apache.org/~trawick/fewerwarnings-2.txt
+1: trawick, sf, wrowe
- * mod_proxy_http: Go a little faster by eliminating a sscanf() call
- when parsing response lines.
- Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=999694
- 2.2.x patch: trunk patch works
- +1: trawick, sf, wrowe
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
if (apr_date_checkmask(buffer, "HTTP/#.# ###*")) {
int major, minor;
- if (2 != sscanf(buffer, "HTTP/%u.%u", &major, &minor)) {
- major = 1;
- minor = 1;
- }
+ major = buffer[5] - '0';
+ minor = buffer[7] - '0';
+
/* If not an HTTP/1 message or
* if the status line was > 8192 bytes
*/
- else if ((buffer[5] != '1') || (len >= sizeof(buffer)-1)) {
+ if ((major != 1) || (len >= sizeof(buffer)-1)) {
return ap_proxyerror(r, HTTP_BAD_GATEWAY,
apr_pstrcat(p, "Corrupt status line returned by remote "
"server: ", buffer, NULL));