summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-11-19 11:16:23 -0800
committerPixel <pixel@nobis-crew.org>2011-11-19 11:16:23 -0800
commit0da530dfe7ce7effb33feda9c9b99486e80a767d (patch)
treed9da35593d903ea91d30bc25c73890184f4f5ab7
parentef18c9c988730813f6299d0c7792920e525137fd (diff)
Of course, spaces are optionnal...
-rw-r--r--src/HttpServer.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/HttpServer.cc b/src/HttpServer.cc
index 3da8cf5..961af0f 100644
--- a/src/HttpServer.cc
+++ b/src/HttpServer.cc
@@ -258,16 +258,17 @@ bool Balau::HttpWorker::handleClient() {
String::List connVals = conn.split(',');
bool gotOne = false;
for (String::List::iterator j = connVals.begin(); j != connVals.end(); j++) {
- if ((*j == "close") && (!gotOne)) {
+ String t = j->trim();
+ if ((t == "close") && (!gotOne)) {
gotOne = true;
persistent = false;
- } else if ((*j == "keep-alive") && (!gotOne)) {
+ } else if ((t == "keep-alive") && (!gotOne)) {
gotOne = true;
persistent = true;
- } else if (*j == "TE") {
+ } else if (t == "TE") {
Balau::Printer::elog(Balau::E_HTTPSERVER, "%s got the 'TE' connection marker (which is still unknown)", m_name.to_charp());
} else {
- Balau::Printer::elog(Balau::E_HTTPSERVER, "%s has an improper Connection HTTP header (%s)", m_name.to_charp(), j->to_charp());
+ Balau::Printer::elog(Balau::E_HTTPSERVER, "%s has an improper Connection HTTP header (%s)", m_name.to_charp(), t.to_charp());
send400();
return false;
}