Skip to content
Myr

fix response with utf8 bom

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

authored by Eduardo Rodrigues · committed by Eduardo Rodrigues · parent 9e27326 · Browse files · 1 file+3 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+3 added−0 removed

  • other:+3 added−0 removed

1 file+3 added−0 removed

modified:requests/models.py+3 added
853 unmodified lines
854855 # Fallback to auto-detected encoding.856 if self.encoding is None:857 encoding = self.apparent_encoding858 # Forcefully remove BOM from UTF-8859 elif self.encoding.lower() == 'utf-8':860 encoding = 'utf-8-sig'861862 # Decode unicode from given encoding.863 try:864 content = str(self.content, encoding, errors='replace')
92 unmodified lines