#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 ) {
58 ByteStringArray pair;
59 ByteString name;
60 ByteString value;
61
62 (*it).split('=', pair);
63 ByteStringArray::Iterator itPair = pair.begin();
64
65 if (itPair != pair.end()) {
66 name = (*itPair);
67
68 itPair++;
69 if (itPair != pair.end()) {
70 value = (*itPair);
71 }
72
73 _results[UTF8Decoder::decode(name)] =
74 UTF8Decoder::decode(value);
75 }
76 }
77}
The documentation for this class was generated from the following files: