Closed spovlot closed 1 year ago
as the author of #26 I can confirm this fixes the content length. And as far as I can see, the capitalization issue too
Functionally, it shouldn't matter, but should we be consistent between request and response in the use of case for headers?
Functionally, it shouldn't matter, but should we be consistent between request and response in the use of case for headers?
The HTTP Standard states that header names are case-insensitive - https://www.rfc-editor.org/rfc/rfc9110.html#section-5.1-3 .
The issue #27 manifested itself as a case issue. But I think that was a side effect related to the overwriting of the passed in object.
agree with @spovlot as well that changing the dictionary values are the root cause of the issue noted and the fix from this change. case consistency could be discussed and / or changed in the future still independent from this fix.
Fix for issue #26 which was caused by the passed in headers dict getting modified for the response. Then the calling program reused the headers in subsequent calls. Thanks to @dhalbert and @anecdata for assistance on Discord.