Merge pull request #904 from satherton/fix-http-header-case-sensitivity
HTTP header field names are now treated as case insensitive.
This commit is contained in:
commit
f1b4377ced
|
@ -24,7 +24,13 @@
|
|||
#include "fdbclient/Knobs.h"
|
||||
|
||||
namespace HTTP {
|
||||
typedef std::map<std::string, std::string> Headers;
|
||||
struct is_iless {
|
||||
bool operator() (const std::string &a, const std::string &b) const {
|
||||
return strcasecmp(a.c_str(), b.c_str()) < 0;
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::map<std::string, std::string, is_iless> Headers;
|
||||
|
||||
std::string urlEncode(const std::string &s);
|
||||
|
||||
|
|
|
@ -469,6 +469,9 @@ inline static void flushOutputStreams() { fflush(NULL); }
|
|||
|
||||
#define crashAndDie() (*(volatile int*)0 = 0)
|
||||
|
||||
#ifdef _WIN32
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
#if defined(__GNUG__)
|
||||
#define DEFAULT_CONSTRUCTORS(X) \
|
||||
|
|
Loading…
Reference in New Issue