Specific behavior for the default explicit port in HTTPS Host: header?

In HTTPS, should the server act differently if the default port / is not specified in the host header? That is, in HTTPS, consider these two headers as part of the request:

Host: www.example.com

Host: www.example.com:443

As far as I know, the HTTP specification says that a port should be enabled if it is not the default port. However, as far as I can tell, he does not mention what to do if the port is explicitly enabled by default (since this is not necessary). It seems that I can not find anything for HTTPS, and this is what I am interested in in this case.

Like this question , which concerns HTTP and asks if a port is needed.

In the context, I work with the Mechanize Python module and, when working with some 302 redirects through the login service, Host: a header with a standard port (i.e. 443). However, the server receiving this header does not seem to like it, and only acts correctly when the port is not turned on. I am trying to determine if this is a server error or is being mechanized or not. I think this is the first, but I have only the opportunity to change the way mechanization.

+4
source share
2 answers

, RFC 2616 , , RFC HTTPS , RFC 2818 , HTTPS 443. , HTTP- 80 HTTPS 443. RFC , , IMHO, ( ), . , , .

, ,

+4

, ", ", HTTP, , - , . , . , , , , , , " ".

: .. , , , , .

+2

Source: https://habr.com/ru/post/1533443/


All Articles