summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-08-21 10:12:04 -0400
committerNick Mathewson <nickm@torproject.org>2018-08-21 10:12:04 -0400
commitff0be080598a8719032fd8c57aed9a42888b97b0 (patch)
tree388d39ad291022c7916d15a3369377ee41e7bf8f /src/or
parentc798957b5925b637896bf162f58aca806235c2a5 (diff)
downloadtor-ff0be080598a8719032fd8c57aed9a42888b97b0.tar.gz
tor-ff0be080598a8719032fd8c57aed9a42888b97b0.zip
Fix a bug warning when sending an error on an HTTPTunnelPort conn
Fixes bug 26470; bugfix on 0.3.2.1-alpha.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/connection_edge.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index f178917f0b..b4e544c8f6 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -2537,8 +2537,11 @@ connection_ap_process_http_connect(entry_connection_t *conn)
err:
if (BUG(errmsg == NULL))
errmsg = "HTTP/1.0 400 Bad Request\r\n\r\n";
- log_warn(LD_EDGE, "Saying %s", escaped(errmsg));
+ log_info(LD_EDGE, "HTTP tunnel error: saying %s", escaped(errmsg));
connection_buf_add(errmsg, strlen(errmsg), ENTRY_TO_CONN(conn));
+ /* Mark it as "has_finished" so that we don't try to send an extra socks
+ * reply. */
+ conn->socks_request->has_finished = 1;
connection_mark_unattached_ap(conn,
END_STREAM_REASON_HTTPPROTOCOL|
END_STREAM_REASON_FLAG_ALREADY_SOCKS_REPLIED);
@@ -4162,4 +4165,3 @@ connection_edge_free_all(void)
smartlist_free(pending_entry_connections);
pending_entry_connections = NULL;
}
-