requests / toolbelt

A toolbelt of useful classes and functions to be used with python-requests
https://toolbelt.readthedocs.org
Other
999 stars 186 forks source link

Dump line break is not OS dependant #285

Closed rmescandon closed 4 years ago

rmescandon commented 4 years ago

When using utils/dump module to print out http messages to a file, I see that line breaks in Ubuntu are the ones belonging to Windows ('\r\n' instead of '\n')

sigmavirus24 commented 4 years ago

That's the actual HTTP protocol definition which is OS independent. If printing those is a problem for you, perhaps consider a different solution since this is trying to provide as accurate as possible a representation of what bytes are going over the wire or being received over the wire to the best of the library's ability.

rmescandon commented 4 years ago

Good catch. Thought it was a mistake. Thanks