[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #26470 [Core Tor/Tor]: WARN: Saying "HTTP/1.0 405 Method Not Allowed\r\n\r\n" WARN: connection_mark_unattached_ap_(): Bug: stream (marked at src/or/connection_edge.c:2551) sending two socks replies? (on Tor 0.3.3.5-rc 81d71f0d41adf0d8)
#26470: WARN: Saying "HTTP/1.0 405 Method Not Allowed\r\n\r\n" WARN:
connection_mark_unattached_ap_(): Bug: stream (marked at
src/or/connection_edge.c:2551) sending two socks replies? (on Tor
0.3.3.5-rc 81d71f0d41adf0d8)
-------------------------------------------------+-------------------------
Reporter: Tai683 | Owner: (none)
Type: defect | Status:
| needs_information
Priority: Medium | Milestone: Tor:
| unspecified
Component: Core Tor/Tor | Version: Tor:
| 0.3.3.5-rc
Severity: Normal | Resolution:
Keywords: regression?, 033-backport-maybe, | Actual Points:
034-proposed |
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by traumschule):
{{{
$ git log --pretty=oneline -S "sending two socks replies?"
7a79acd9f6d377533940ee12fcb3afaaa982b04d clean up socks reply stuff more.
add a few more reasons so we can be more informative.
$ git checkout 7a79acd9f6d377533940ee12fcb3afaaa982b04d
$ rgrep "sending two socks replies?"
src/or/connection_edge.c: log_fn(LOG_WARN,"Bug: stream (marked at
%s:%d) sending two socks replies?",
test.log:Aug 12 19:53:09.000 [warn] connection_mark_unattached_ap_(): Bug:
stream (marked at ../src/core/or/connection_edge.c:2605) sending two socks
replies? (on Tor 0.3.5.0-alpha-dev )
}}}
7a79acd9f6d377533940ee12fcb3afaaa982b04d is from 2005, looking at the
first warning:
{{{
$ git log --pretty=oneline -S "HTTP/1.0 405 Method Not Allowed"
4b30ae158175a3a1cbbed4bb418e8ad9be1ba35e Add support for HTTP Connect
tunnels
$ gitk
}}}
> Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx> 2017-08-20 17:59:58
> Follows: tor-0.3.1.3-alpha
> Precedes: tor-0.3.2.1-alpha
{{{
+ socks->command = SOCKS_COMMAND_CONNECT;
+ socks->listener_type = CONN_TYPE_AP_HTTP_CONNECT_LISTENER;
+ strlcpy(socks->address, addr, sizeof(socks->address));
+ socks->port = port;
+
+ control_event_stream_status(conn, STREAM_EVENT_NEW, 0);
+
+ rv = connection_ap_rewrite_and_attach_if_allowed(conn, NULL, NULL);
+
+ // XXXX send a "100 Continue" message?
+
+ goto done;
+
+ err:
+ if (BUG(errmsg == NULL))
+ errmsg = "HTTP/1.0 400 Bad Request\r\n\r\n";
+ log_warn(LD_EDGE, "Saying %s", escaped(errmsg));
+ connection_write_to_buf(errmsg, strlen(errmsg), ENTRY_TO_CONN(conn));
+ connection_mark_unattached_ap(conn,
+ END_STREAM_REASON_HTTPPROTOCOL|
+
END_STREAM_REASON_FLAG_ALREADY_SOCKS_REPLIED);
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26470#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs