sparckles / Robyn

Robyn is a Super Fast Async Python Web Framework with a Rust runtime.
https://robyn.tech/
BSD 2-Clause "Simplified" License
4.3k stars 221 forks source link

Fixed #605 custom content-type setting not effected sometimes #701

Closed 18o closed 10 months ago

18o commented 10 months ago

Description

This PR fixes #605

global_response_headers in Server is a DashMap, which is case sensitive. The default key is Content-Type can be stay together with content-type in global_response_headers, so when it's extended , both Content-Type and content-type are written to http header without fixed sequence, but the browser is case insensitive, so it will take the last value in Content-Type and content-type, that's why this bug happened.

vercel[bot] commented 10 months ago

@18o is attempting to deploy a commit to the sparckles Team on Vercel.

A member of the Team first needs to authorize it.

sansyrox commented 10 months ago

hey @18o 👋

Apologies for the delayed review here. I am working on a PR here - https://github.com/sparckles/Robyn/pull/704 , which might solve the issue at a more fundamental level. I will merge it and hopefully, the issue should be fixed.

sansyrox commented 10 months ago

Hey @18o 👋

Thank you for the PR. However, there was a more fundamental flaw in the code. It has been fixed in v0.47.0 😄