You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are no similar issues or pull requests for this yet.
I discussed this idea on the community chat and feedback is positive.
Is your feature related to a problem? Please describe.
I am currently serving PDFs using StreamingReponse and Range Requests (https://tools.ietf.org/html/rfc7233) specific headers to load them in batches using Mozilla pdf.js javascript library. The problem is that they have a case-sensitive implementation of headers, this is causing to fail because Starlette by default lower cases all headers.
A parameter in Response that could be inherited through all responses that did enable case-sensitive headers
Describe alternatives you considered
I have considered copying Reponse and StreamingResponse classes and customize them to don't lower case headers, however I don't think this is a long term solution.
Additional context
There are many libraries that consider headers to be case sensitive
The text was updated successfully, but these errors were encountered:
Checklist
Is your feature related to a problem? Please describe.
I am currently serving PDFs using
StreamingReponse
andRange Requests
(https://tools.ietf.org/html/rfc7233) specific headers to load them in batches using Mozillapdf.js
javascript library. The problem is that they have a case-sensitive implementation of headers, this is causing to fail becauseStarlette
by default lower cases all headers.I have tried disabling
.lower()
inResponse
class manually and everything works as expected:https://github.com/encode/starlette/blob/master/starlette/responses.py
Describe the solution you would like.
A parameter in
Response
that could be inherited through all responses that did enable case-sensitive headersDescribe alternatives you considered
I have considered copying
Reponse
andStreamingResponse
classes and customize them to don't lower case headers, however I don't think this is a long term solution.Additional context
There are many libraries that consider headers to be case sensitive
The text was updated successfully, but these errors were encountered: