summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2017-10-25 14:58:08 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-10-25 14:58:08 -0500
commit760fab5e0b6899651e10e0e1d86d6adb5b3e33b3 (patch)
treef30e570293e41c2043debc9cc5eb1285dcf6d77b
parentaa1c969942e9e209790e3e2093308e287595bffe (diff)
parent373a1a9797009995090e5a06ad282853e4b96565 (diff)
Merge "http.c: Fix http header send content." into 15
-rw-r--r--main/http.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/main/http.c b/main/http.c
index 7191eb524..30b2fe2c4 100644
--- a/main/http.c
+++ b/main/http.c
@@ -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));