Closed GoogleCodeExporter closed 8 years ago
I can't reproduce this, here's my output:
>>> h = httplib2.Http('.cache')
>>> response, content =
h.request("http://maps.google.com/maps/ms?ie=UTF8&hl=ja&msa=0&output=kml&msid=21
2735829903317511302.00049fc13f56b1b8f1555", "GET")
>>> content
'<?xml version="1.0" encoding="UTF-8"?>\n<kml
xmlns="http://earth.google.com/kml/2.2">\n<Document>\n
<name>\xe7\x84\xa1\xe9\xa1\x8c</name>\n
<description><![CDATA[]]></description>\n</Document>\n</kml>\n'
>>> response
{'status': '200', 'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff', 'content-disposition': 'attachment;
filename="\xe7\x84\xa1\xe9\xa1\x8c.kml"', 'transfer-encoding': 'chunked',
'set-cookie':
'PREF=ID=e36f33a09693f9d1:TM=1301591143:LM=1301591143:S=Aa1xQUC5S2MUDp2J;
expires=Sat, 30-Mar-2013 17:05:43 GMT; path=/; domain=.google.com', 'expires':
'-1', 'server': 'mfe', 'cache-control': 'private, max-age=0', 'date': 'Thu, 31
Mar 2011 17:05:43 GMT', 'content-type': 'application/vnd.google-earth.kml+xml;
charset=UTF-8', 'content-location':
'http://maps.google.com/maps/ms?ie=UTF8&hl=ja&msa=0&output=kml&msid=212735829903
317511302.00049fc13f56b1b8f1555'}
Original comment by umb...@gmail.com
on 31 Mar 2011 at 5:06
I'm using OS X 10.6.6, Python 2.6.1. May be a Python3 issue.
Original comment by umb...@gmail.com
on 31 Mar 2011 at 5:08
I have tested on Python 2.7.1 and works correctly.
It seems that this problem only occurs on Python 3.
$ python2.7
Python 2.7.1 (r271:86832, Dec 23 2010, 22:25:36)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import httplib2
>>> h = httplib2.Http(".cache")
>>> response, content =
h.request("http://maps.google.com/maps/ms?ie=UTF8&hl=ja&msa=0&output=kml&msid=21
2735829903317511302.00049fc13f56b1b8f1555", "GET")
>>> content
'<?xml version="1.0" encoding="UTF-8"?>\n<kml
xmlns="http://earth.google.com/kml/2.2">\n<Document>\n
<name>\xe7\x84\xa1\xe9\xa1\x8c</name>\n
<description><![CDATA[]]></description>\n</Document>\n</kml>\n'
>>> response
{'status': '200', 'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff', 'content-disposition': 'attachment;
filename="\xe7\x84\xa1\xe9\xa1\x8c.kml"', 'transfer-encoding': 'chunked',
'set-cookie':
'PREF=ID=6e5da26c21ad6ca9:TM=1301612276:LM=1301612276:S=Msq_hdxdikrNVIGF;
expires=Sat, 30-Mar-2013 22:57:56 GMT; path=/; domain=.google.com', 'expires':
'-1', 'server': 'mfe', 'cache-control': 'private, max-age=0', 'date': 'Thu, 31
Mar 2011 22:57:56 GMT', 'content-type': 'application/vnd.google-earth.kml+xml;
charset=UTF-8', 'content-location':
'http://maps.google.com/maps/ms?ie=UTF8&hl=ja&msa=0&output=kml&msid=212735829903
317511302.00049fc13f56b1b8f1555'}
>>>
Original comment by msm...@gmail.com
on 31 Mar 2011 at 11:09
Fixed in
http://code.google.com/p/httplib2/source/detail?r=8b6bf8972e299e9eeaf411fa25fff2
da97b8c0dc
Original comment by joe.gregorio@gmail.com
on 13 Jun 2011 at 4:45
email.message_from_bytes() function has been introduced in Python 3.2. Is it
intentional that Python 3.1 is no longer supported?
(Personally I don't need to use Python 3.1.)
Original comment by Arfrever...@gmail.com
on 10 Jul 2011 at 12:46
Original issue reported on code.google.com by
msm...@gmail.com
on 31 Mar 2011 at 8:20