mirror of
https://github.com/anope/anope.git
synced 2026-07-02 23:43:12 +02:00
m_httpd: make http headers case insensitive
This commit is contained in:
@@ -23,7 +23,7 @@ struct HTTPReply
|
||||
{
|
||||
HTTPError error;
|
||||
Anope::string content_type;
|
||||
std::map<Anope::string, Anope::string> headers;
|
||||
std::map<Anope::string, Anope::string, ci::less> headers;
|
||||
typedef std::list<std::pair<Anope::string, Anope::string> > cookie;
|
||||
std::vector<cookie> cookies;
|
||||
|
||||
|
||||
+2
-2
@@ -199,7 +199,7 @@ class MyHTTPClient : public HTTPClient
|
||||
this->page = this->provider->FindPage(targ);
|
||||
this->page_name = targ;
|
||||
}
|
||||
else if (buf.find("Cookie: ") == 0)
|
||||
else if (buf.find_ci("Cookie: ") == 0)
|
||||
{
|
||||
spacesepstream sep(buf.substr(8));
|
||||
Anope::string token;
|
||||
@@ -215,7 +215,7 @@ class MyHTTPClient : public HTTPClient
|
||||
this->message.cookies[token.substr(0, sz)] = token.substr(sz + 1, end);
|
||||
}
|
||||
}
|
||||
else if (buf.find("Content-Length: ") == 0)
|
||||
else if (buf.find_ci("Content-Length: ") == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user