Code Monkey home page Code Monkey logo

Comments (5)

MihaZupan avatar MihaZupan commented on September 13, 2024

I can't tell from from the spec whether the hosts header may not contain a port when a connection is not meant for port 443. I can of course add functionality to try deduce the port from the request-target if one is not present in the hosts header.

from httptosocks5proxy.

DCNick3 avatar DCNick3 commented on September 13, 2024

My point is that it's guranteed that port will present in request-target, while Host is not.

Whoops, I missed the spot, because RFC 7230, section 5.4: Host says:

If the target URI includes an authority component, then a
client MUST send a field-value for Host that is identical to that
authority component, excluding any userinfo subcomponent and its "@"
delimiter (Section 2.7.1).

Probably should create an issue in websocket-sharp

But I still think, that trying to figure out port using more sources is better (because standards are not always followed).

from httptosocks5proxy.

MihaZupan avatar MihaZupan commented on September 13, 2024

I agree, I'll add it just in case someone comes across a similar scenario.

from httptosocks5proxy.

MihaZupan avatar MihaZupan commented on September 13, 2024

@DCNick3 Is this okay? I don't really have the means to test it.

from httptosocks5proxy.

DCNick3 avatar DCNick3 commented on September 13, 2024

Well, It works for me, other cases seem sane.
Thanks.

from httptosocks5proxy.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.