Bug 57293 - python 1.5.2 urllib open_http() drops protocol
python 1.5.2 urllib open_http() drops protocol
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: python (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
Brock Organ
http://home.earthlink.net/~joefefifo/...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-08 20:54 EST by Joe Antao
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-08-14 12:26:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patches /usr/lib/python1.5/urllib.py in Red Hat 7.1 and 7.2 (739 bytes, patch)
2001-12-08 20:55 EST, Joe Antao
no flags Details | Diff

  None (edit)
Description Joe Antao 2001-12-08 20:54:27 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120

Description of problem:
When retrieving a web page using URLopener.open() in urllib, the object
returned is missing the protocol in its 'url' member.

Specifically, the class method open_http(), which is called from
URLopener.open(),drops the protocol.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Following is a printout of how to reproduce the bug in an interactive
python session (launch python at command line):

Python 1.5.2 (#1, Jul  5 2001, 03:02:19)  [GCC 2.96 20000731 (Red Hat
Linux 7.1 2 on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import urllib
>>> retriever = urllib.URLopener()
>>> webdoc = retriever.open('http://www.yahoo.com')
>>> print webdoc.url
://www.yahoo.com
>>> 

Note that "webdoc.url" should also include the protocol. Red Hat's
version of Python 1.5.2 doesn't. 
 

Actual Results:  The object returned from URLopener.open() is missing a
protocol in its 'url' class member.

Expected Results:  The object returned should have the protocol included
in the 'url' member.

Additional info:

This is specific to Red Hat's version of Pyton 1.5.2

I have a patch available which I will try to upload to bugzilla.
Comment 1 Joe Antao 2001-12-08 20:55:39 EST
Created attachment 40187 [details]
patches /usr/lib/python1.5/urllib.py in Red Hat 7.1 and 7.2
Comment 2 Kjetil T. Homme 2002-01-31 17:57:47 EST
A different patch is to initialise urltype to "http" on line 229.
Comment 3 Trond Eivind Glomsrxd 2002-08-14 12:22:18 EDT
This is fixed in python 2.2, e.g. 2.2.1-16

Note You need to log in before you can comment on or make changes to this bug.