Skip to content
Myr

fix content uploads

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

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 3d3f058 · Browse files · 1 file+10 added−0 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+10 added−0 removed

  • other:+10 added−0 removed

1 file+10 added−0 removed

modified:requests/models.py+10 added
345 unmodified lines
346 fields = self.data.copy()347 for (k, v) in self.files.items():348 fields.update({k: (k, v.read())})349 (body, content_type) = encode_multipart_formdata(fields)350 else:351 pass352 # TODO: Conflict?353 else:354 if self.data:355 body = self._enc_data356 content_type = 'application/x-www-form-urlencoded'357 print body358359360361 # TODO: Setup cookies.362363 # Add content-type if it wasn't explicitly provided.364 if (content_type) and (not 'content-type' in self.headers):
195 unmodified lines