diff --git a/uppsrc/Core/TimeDate.cpp b/uppsrc/Core/TimeDate.cpp index 8be0133a7..200b3c202 100644 --- a/uppsrc/Core/TimeDate.cpp +++ b/uppsrc/Core/TimeDate.cpp @@ -444,22 +444,6 @@ String Format(Time time, bool seconds) : Format(" %02d:%02d", time.hour, time.minute)); } -Time ScanTime(const char *fmt, const char *s, Date def) -{ - Date d; - if(StrToDate(fmt, d, s, def)) - return d; - return def; -} - -Time ScanTime(const char *s, Date def) -{ - Date d; - if(StrToDate(d, s, def)) - return d; - return def; -} - const char *StrToTime(Time& d, const char *s) { s = StrToDate(d, s); diff --git a/uppsrc/Web/ScgiServer.cpp b/uppsrc/Web/ScgiServer.cpp index 5d7183371..aa0fdd123 100644 --- a/uppsrc/Web/ScgiServer.cpp +++ b/uppsrc/Web/ScgiServer.cpp @@ -18,6 +18,9 @@ ScgiServer::ScgiServer(int port) signal(SIGABRT, sighandler); signal(SIGINT, sighandler); signal(SIGTERM, sighandler); + + query.CaseSensitive(); + post.CaseSensitive(); } void ScgiServer::Process() diff --git a/uppsrc/Web/util.cpp b/uppsrc/Web/util.cpp index c69b44284..dc49e5298 100644 --- a/uppsrc/Web/util.cpp +++ b/uppsrc/Web/util.cpp @@ -579,7 +579,7 @@ HttpQuery& HttpQuery::SetURL(const String& url) const char *last = p; while(*p && *p != '=' && *p != '&') p++; - String key = ToUpper(UrlDecode(last, p)); + String key = case_sensitive ? UrlDecode(last, p) : ToUpper(UrlDecode(last, p)); if(*p == '=') p++; last = p; diff --git a/uppsrc/Web/util.h b/uppsrc/Web/util.h index d6cbc9216..0a5ae6e3e 100644 --- a/uppsrc/Web/util.h +++ b/uppsrc/Web/util.h @@ -216,10 +216,14 @@ private: VectorMap map; }; + + bool case_sensitive; public: - HttpQuery(const Nuller& = Null) : data(Empty()) {} - explicit HttpQuery(String url) { data = Empty(); SetURL(url); } + HttpQuery(const Nuller& = Null) : data(Empty()) { case_sensitive = false; } + explicit HttpQuery(String url) { data = Empty(); SetURL(url); case_sensitive = false; } + + void CaseSensitive(bool b = true) { case_sensitive = b; } void Serialize(Stream& stream);