[Python-bugs-list] [ python-Bugs-575360 ] httplib BadStatusLine behaves strange

noreply@sourceforge.net noreply@sourceforge.net
Sat, 06 Jul 2002 10:25:35 -0700


Bugs item #575360, was opened at 2002-06-29 13:09
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=575360&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nicole Dornseif (nerxs)
>Assigned to: Jeremy Hylton (jhylton)
Summary: httplib BadStatusLine behaves strange

Initial Comment:
1. linkch.py:
import httplib

try:
   conn = httplib.HTTPConnection('aleph0.clarku.edu')
   conn.request("GET", '/~djoyce/java/elements/toc.html')
   resp = conn.getresponse()
   conn.close()

except httplib.BadStatusLine,msg:
   print msg


nik@deepblack:~$ linkch.py
Traceback (most recent call last):
  File "badstatuslner.py", line 20, in ?
    print msg
AttributeError: BadStatusLine instance has no 
attribute 'args'


2. linkch.py:
import httplib

try:
   conn = httplib.HTTPConnection('aleph0.clarku.edu')
   conn.request("GET", '/~djoyce/java/elements/toc.html')
   resp = conn.getresponse()
   conn.close()

except httplib.BadStatusLine,msg:
   print "%r" %(msg)


nik@deepblack:~$ linkch.py
<httplib.BadStatusLine instance at 0x8156cac>

Python 2.2.1
FreeBSD 4.6-RC


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=575360&group_id=5470