diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2014-08-01 02:53:52 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2014-08-01 02:53:52 +0200 |
commit | 6a8cb061bd78dcec86ab203d4c0e81401be425a8 (patch) | |
tree | af4f73b5acbc298bc4a0e9c81fac01648bbf58df | |
parent | c3ac6151ae32339dc6358b9156126e93e25c02f1 (diff) |
Fixing HTTP server's cooking handling.
-rw-r--r-- | src/HttpServer.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/HttpServer.cc b/src/HttpServer.cc index 917fc8b..d6bc53d 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -403,11 +403,14 @@ bool Balau::HttpWorker::handleClient() { String value = line.extract(colon + 1); if (key == "Cookie") { - int equal = value.strchr('='); - if (equal > 0) { - key = value.extract(0, equal).trim(); - value = value.extract(equal + 1).trim(); - cookies[key] = value; + String::List cookiesStrs = value.split(';'); + for (auto & value: cookiesStrs) { + int equal = value.strchr('='); + if (equal > 0) { + key = value.extract(0, equal).trim(); + value = value.extract(equal + 1).trim(); + cookies[key] = value; + } } } else { httpHeaders[key] = value.trim(); |