Skip to content
Myr

Do not post None values in data.

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

authored by Cory Benfield · committed by Cory Benfield · parent b781acc · Browse files · 1 file+4 added−3 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+4 added−3 removed

  • other:+4 added−3 removed

1 file+4 added−3 removed

modified:requests/models.py+4 added-3 removed
328 unmodified lines
329 elif hasattr(data, '__iter__'):330 result = []331 for k, vs in to_key_val_list(data):332 for v in isinstance(vs, list) and vs or [vs]:333 if v is not None:333 result.append(334 (k.encode('utf-8') if isinstance(k, str) else k,335 v.encode('utf-8') if isinstance(v, str) else v))334 result.append(335 (k.encode('utf-8') if isinstance(k, str) else k,336 v.encode('utf-8') if isinstance(v, str) else v))337 return urlencode(result, doseq=True)338 else:339 return data340
545 unmodified lines