drogonframework / drogon

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows
MIT License
11.04k stars 1.06k forks source link

drogon transform header to lower case? #2002

Closed bethebest0622 closed 2 months ago

bethebest0622 commented 2 months ago

i have a drogon::HttpRequestPtr object to post http request, i add some headers.

but when i output the map:

req_ptr_->addHeader("ASDASD", "haA");
for (const auto & [key, value] : req_ptr_->getHeaders()) cout << key << " = " << value << endl;

I found it is all lower case.

server side is case sensitive, which cause the request failed.

could you help on this?