I refer to this.
It seems urllib2.build_opener does not add the document path (/
) if the url contains just the domain name. For example a web request to http://ibm.com would result in:
GET http://ibm.com HTTP/1.1
instead of:
GET http://ibm.com/ HTTP/1.1
or:
GET / HTTP/1.1
HOST: ibm.com
as practiced by other Http clients such as web browsers or .NET's HttpWebRequest.
Is this by design or a bug?