summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-08-01 02:53:52 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-08-01 02:53:52 +0200
commit6a8cb061bd78dcec86ab203d4c0e81401be425a8 (patch)
treeaf4f73b5acbc298bc4a0e9c81fac01648bbf58df /src
parentc3ac6151ae32339dc6358b9156126e93e25c02f1 (diff)
Fixing HTTP server's cooking handling.
Diffstat (limited to 'src')
-rw-r--r--src/HttpServer.cc13
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();