Skip to content
Myr

Check for basestring, not just str

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fixes #2071

authored by Ian Cordasco · committed by Ian Cordasco · parent 6c72509 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:requests/models.py+1 added-1 removed
431 unmodified lines
432 (body, content_type) = self._encode_files(files, data)433 else:434 if data:435 body = self._encode_params(data)436 if isinstance(data, str) or isinstance(data, builtin_str) or hasattr(data, 'read'):436 if isinstance(data, basestring) or isinstance(data, builtin_str) or hasattr(data, 'read'):437 content_type = None438 else:439 content_type = 'application/x-www-form-urlencoded'440
367 unmodified lines