eshad / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

using port 443 automatically switches to https #149

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
  1. try making an http request to a non-https server on port 443, using "http" as the scheme in the uri

What is the expected output?
  a successful response

What do you see instead?

  an attempt to negotiate a TLS connection

Please provide any additional information below.

  relevant specs: rfc2818 2.3, rfc2616 1.4 (last paragraph)

  both specs mention that there is a default port (80 and 443), but that other ports can be used. the https:// scheme with no port specified implies 443, but 443 with scheme http:// doesn't imply https.

  patch attached

Original issue reported on code.google.com by travis.p...@gmail.com on 27 May 2011 at 10:17

Attachments:

GoogleCodeExporter commented 9 years ago
uploaded to rietveld

http://codereview.appspot.com/4524077/

Original comment by travis.p...@gmail.com on 28 May 2011 at 12:11

GoogleCodeExporter commented 9 years ago

Original comment by joe.gregorio@gmail.com on 13 Jun 2011 at 4:58

GoogleCodeExporter commented 9 years ago
what's the justification for wontfix?

http:// with no explicit port implies port 80 and https:// implies 443, but 443 
doesn't imply encryption without the https://.

it'd be pretty foolish to serve unencrypted http on port 443, but that's no 
reason for httplib2 to be unable to make requests there. the code is just wrong 
as is.

Original comment by travis.p...@gmail.com on 13 Jun 2011 at 7:08

GoogleCodeExporter commented 9 years ago
travis has it right.

even if it's pretty foolish.. there are some http server on 443 ports (for 
example the non-sensitive trading data stream of my online bank!!) so the patch 
should be accepted.

Original comment by lorenzo....@gmail.com on 6 Jul 2011 at 6:05