Added missing \r\n after chunk
This commit is contained in:
parent
1fa784c709
commit
d8637958dd
|
@ -347,6 +347,13 @@ int Downstream::push_upload_data_chunk(const uint8_t *data, size_t datalen)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
res += rv;
|
res += rv;
|
||||||
|
if(chunked_request_) {
|
||||||
|
rv = evbuffer_add(output, "\r\n", 2);
|
||||||
|
if(rv == -1) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
res += 2;
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -575,6 +575,9 @@ int HttpsUpstream::on_downstream_body(Downstream *downstream,
|
||||||
evbuffer_add(output, chunk_size_hex, rv);
|
evbuffer_add(output, chunk_size_hex, rv);
|
||||||
}
|
}
|
||||||
evbuffer_add(output, data, len);
|
evbuffer_add(output, data, len);
|
||||||
|
if(downstream->get_chunked_response()) {
|
||||||
|
evbuffer_add(output, "\r\n", 2);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue