#include <HttpCollection.h>
|
static void | decode (const ByteString &_contents, ListedStringToStringMap &_results) |
Definition at line 34 of file HttpCollection.h.
◆ decode()
__DCL_BEGIN_NAMESPACE void HttpCookieDecoder::decode |
( |
const ByteString & | _contents, |
|
|
ListedStringToStringMap & | _results ) |
|
static |
Definition at line 47 of file HttpCollection.cpp.
51{
52 ByteStringArray elements;
53 _contents.split(';', elements);
54
55 for(ByteStringArray::Iterator it = elements.begin();
56 it != elements.end(); it++) {
57 ByteStringArray pair;
58 ByteString name;
59 ByteString value;
60
61 (*it).split('=', pair);
62 ByteStringArray::Iterator itPair = pair.begin();
63
64 if (itPair != pair.end()) {
65 name = (*itPair);
66
67 itPair++;
68 if (itPair != pair.end()) {
69 value = (*itPair);
70 }
71
72 _results[UTF8Decoder::decode(name)] =
73 UTF8Decoder::decode(value);
74 }
75 }
76}
The documentation for this class was generated from the following files: