Added missing \r\n after chunk

This commit is contained in:
Tatsuhiro Tsujikawa 2012-06-10 02:51:42 +09:00
parent 1fa784c709
commit d8637958dd
2 changed files with 10 additions and 0 deletions

View File

@ -347,6 +347,13 @@ int Downstream::push_upload_data_chunk(const uint8_t *data, size_t datalen)
return -1;
}
res += rv;
if(chunked_request_) {
rv = evbuffer_add(output, "\r\n", 2);
if(rv == -1) {
return -1;
}
res += 2;
}
return res;
}

View File

@ -575,6 +575,9 @@ int HttpsUpstream::on_downstream_body(Downstream *downstream,
evbuffer_add(output, chunk_size_hex, rv);
}
evbuffer_add(output, data, len);
if(downstream->get_chunked_response()) {
evbuffer_add(output, "\r\n", 2);
}
return 0;
}