[New-bugs-announce] [issue3094] By default, HTTPSConnection should send header "Host: somehost" instead of "Host: somehost:443"

Steven Wong report at bugs.python.org
Thu Jun 12 22:01:24 CEST 2008


New submission from Steven Wong <sliderw at hotmail.com>:

Communicating over HTTPS at the default port of 443:

import httplib
conn = httplib.HTTPSConnection("my-secure-domain.com")
conn.request("GET", "/")
res = conn.getresponse()

In the current implementation, the Host header sent in the request is:

  Host: my-secure-domain.com:443

The ":443" is unnecessary because the default port of HTTPS is 443. The
attached patch file fixes this so that the Host header sent is simply:

  Host: my-secure-domain.com

----------
components: Library (Lib)
files: httplib.py.patch
keywords: patch
messages: 68079
nosy: steven.w
severity: normal
status: open
title: By default, HTTPSConnection should send header "Host: somehost" instead of "Host: somehost:443"
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file10605/httplib.py.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3094>
_______________________________________


More information about the New-bugs-announce mailing list