Merge "http.c: Fix http header send content." into 15

15.6
George Joseph 8 years ago committed by Gerrit Code Review
commit 760fab5e0b

@ -529,10 +529,8 @@ void ast_http_send(struct ast_tcptls_session_instance *ser,
) <= 0) {
ast_debug(1, "ast_iostream_printf() failed: %s\n", strerror(errno));
close_connection = 1;
}
/* send content */
if (!close_connection && send_content && fd) {
} else if (send_content && fd) {
/* send file content */
while ((len = read(fd, buf, sizeof(buf))) > 0) {
if (ast_iostream_write(ser->stream, buf, len) != len) {
ast_debug(1, "ast_iostream_write() failed: %s\n", strerror(errno));

Loading…
Cancel
Save