[Remove entries to the current 2.0 section below, when backported]
+ *) mod_isapi: GetServerVariable returned improperly terminated header
+ fields given "ALL_HTTP" or "ALL_RAW". PR 20656.
+ [Jesse Pelton <jsp pkc.com>]
+
*) mod_isapi: send_response_header() failed to copy status string's
last character. PR 20619. [Jesse Pelton <jsp pkc.com>]
if (!strcmp(variable_name, "ALL_HTTP"))
{
- /* lf delimited, colon split, comma seperated and
+ /* crlf delimited, colon split, comma separated and
* null terminated list of HTTP_ vars
*/
const apr_array_header_t *arr = apr_table_elts(r->subprocess_env);
for (len = 0, i = 0; i < arr->nelts; i++) {
if (!strncmp(elts[i].key, "HTTP_", 5)) {
- len += strlen(elts[i].key) + strlen(elts[i].val) + 2;
+ len += strlen(elts[i].key) + strlen(elts[i].val) + 3;
}
}
*(((char*)buf_data)++) = ':';
strcpy(buf_data, elts[i].val);
((char*)buf_data) += strlen(elts[i].val);
+ *(((char*)buf_data)++) = '\r';
*(((char*)buf_data)++) = '\n';
}
}
if (!strcmp(variable_name, "ALL_RAW"))
{
- /* lf delimited, colon split, comma seperated and
+ /* crlf delimited, colon split, comma separated and
* null terminated list of the raw request header
*/
const apr_array_header_t *arr = apr_table_elts(r->headers_in);
int i;
for (len = 0, i = 0; i < arr->nelts; i++) {
- len += strlen(elts[i].key) + strlen(elts[i].val) + 3;
+ len += strlen(elts[i].key) + strlen(elts[i].val) + 4;
}
if (*buf_size < len + 1) {
*(((char*)buf_data)++) = ' ';
strcpy(buf_data, elts[i].val);
((char*)buf_data) += strlen(elts[i].val);
+ *(((char*)buf_data)++) = '\r';
*(((char*)buf_data)++) = '\n';
}
*(((char*)buf_data)++) = '\0';