/* recall at this point that c->len is already set from resp_hdrs.
If Content-Length was NULL, then c->len is -1, otherwise it's
set to whatever the value was. */
- if (c->len == 0) {
+ if (c->len == 0 || c->len == -1) {
const char *c_clen_str;
off_t c_clen;
if ( (c_clen_str = ap_table_get(c->hdrs, "Content-Length")) &&
( (c_clen = ap_strtol(c_clen_str, NULL, 10)) > 0) ) {
ap_table_set(resp_hdrs, "Content-Length", c_clen_str);
c->len = c_clen;
+ ap_proxy_sec2hex(c->len, buff + 17 * (6));
+ buff[17 * (7) - 1] = '\n';
+ buff[17 * (7)] = '\0';
}
}
if (!ap_proxy_table_replace(c->hdrs, resp_hdrs)) {