[issue21896] Unexpected ConnectionResetError in urllib.request against a valid website

2014-07-02 Thread Tymoteusz Paul

Changes by Tymoteusz Paul puc...@gmail.com:


--
versions: +Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21896
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21896] Unexpected ConnectionResetError in urllib.request against a valid website

2014-07-01 Thread Tymoteusz Paul

New submission from Tymoteusz Paul:

I've recently ran into a problem with urellib.request.urlopen that it fails 
against one website (that I've found so far). The website itself is working 
fine, I can access its content with other libraries like requests, curl and 
outside of python with telnet, links and so on. But with urllib it fails:

Python 3.4.1 (default, Jul  1 2014, 14:08:25)
[GCC 4.7.3] on linux
Type help, copyright, credits or license for more information.
 import urllib.request
 urllib.request.urlopen(http://www.thomsonlocal.com/;)
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib64/python3.4/urllib/request.py, line 153, in urlopen
return opener.open(url, data, timeout)
  File /usr/lib64/python3.4/urllib/request.py, line 455, in open
response = self._open(req, data)
  File /usr/lib64/python3.4/urllib/request.py, line 473, in _open
'_open', req)
  File /usr/lib64/python3.4/urllib/request.py, line 433, in _call_chain
result = func(*args)
  File /usr/lib64/python3.4/urllib/request.py, line 1215, in http_open
return self.do_open(http.client.HTTPConnection, req)
  File /usr/lib64/python3.4/urllib/request.py, line 1194, in do_open
r = h.getresponse()
  File /usr/lib64/python3.4/http/client.py, line 1172, in getresponse
response.begin()
  File /usr/lib64/python3.4/http/client.py, line 351, in begin
version, status, reason = self._read_status()
  File /usr/lib64/python3.4/http/client.py, line 313, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), iso-8859-1)
  File /usr/lib64/python3.4/socket.py, line 371, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer

I've tested it on about 6 different servers, in different parts of the world 
and all of them seem to be affected. I've tested with with 3.2.5, 3.3.3, 3.4.1 
and they are all failed with the same trace.

--
components: Library (Lib)
messages: 222024
nosy: Tymoteusz.Paul
priority: normal
severity: normal
status: open
title: Unexpected ConnectionResetError in urllib.request against a valid website
type: crash
versions: Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21896
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19208] Bas64.decodestring() returns data instead of throwing exception

2013-10-09 Thread Tymoteusz Paul

New submission from Tymoteusz Paul:

What happens (and how to reproduce):

import base64
str = GET 
http://www.google.com.hk/search?q=hotels+near+airportpws=1igu=1ip=0.0.0.0safe=imagesgl=CNgll=39.913889,116.391667near=chinahl=zh-CN
 HTTP/1.0\nContent-Length: 0\nUser-Agent: Opera/9.80 (X11; Linux i686; U; 
en-US) Presto/2.9.173 Version/12.00\nProxy-Authorization: Basic\nAuthorization: 
Basic\nReferer: http://www.google.com/\n\n;
base64.decodestring(str)

What is expected:
Exception should be throw as provided string is not encoded with base64. 

What is the result:
We receive some garbage string which hex representation is 
'\x18D\xe1\xb6\xda\x7f\xff\x0c0\x82\x8a \x95\xe7(\x9a\x19?\xb1\xe6\xabr\x1a'

--
messages: 199299
nosy: Tymoteusz.Paul
priority: normal
severity: normal
status: open
title: Bas64.decodestring() returns data instead of throwing exception
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19208
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com