Changed to use string explicitly
Python 2 would see None and an empty string as the same.
Bytes is also just an alias for str.
In Python 3, they are different and can't be used interchangeably.
diff --git a/googleapiclient/http.py b/googleapiclient/http.py
index 1638125..d09483c 100644
--- a/googleapiclient/http.py
+++ b/googleapiclient/http.py
@@ -1089,7 +1089,7 @@
# Construct status line
parsed = urlparse(request.uri)
request_line = urlunparse(
- (None, None, parsed.path, parsed.params, parsed.query, None)
+ ('', '', parsed.path, parsed.params, parsed.query, '')
)
status_line = request.method + ' ' + request_line + ' HTTP/1.1\n'
major, minor = request.headers.get('content-type', 'application/json').split('/')
@@ -1124,7 +1124,7 @@
if request.body is None:
body = body[:-2]
- return status_line.encode('utf-8') + body
+ return status_line + body
def _deserialize_response(self, payload):
"""Convert string into httplib2 response and content.