#1667: Give a more appropriate "I'm not an HTTP proxy" message when we get an
HTTP
request on the control port
----------------------------+-----------------------------------------------
Reporter: nickm | Owner: neena
Type: enhancement | Status: accepted
Priority: trivial | Milestone: Tor: unspecified
Component: Tor Client | Version:
Resolution: | Keywords: easy
Parent: | Points:
Actualpoints: |
----------------------------+-----------------------------------------------
Changes (by neena):
* status: needs_review => accepted
* owner: => neena
Comment:
Replying to [comment:12 rransom]:
> This would be fine except that almost every controller we care about
starts its control connections by sending “`PROTOCOLINFO\r\n`”. You
really do need to use something like `strcasecmpstart` (defined in
src/common/util.h and .c; hopefully I'm spelling its name correctly) to
compare the first chunk of data with “`GET `”, “`POST `”, etc.. (The
SOCKSPort code only looks at the first byte because the first byte sent on
a SOCKS connection must be the SOCKS version number.)
Made the change. I had (incorrectly) assumed that TC connections begin
with an AUTHENTICATE command. So, I decided to use the switch-case in the
"not an HTTP Proxy" code instead of strcasecmpstart.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/1667#comment:13>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs