DCL 4.0
Loading...
Searching...
No Matches
HttpCookieDecoder Class Reference

#include <HttpCollection.h>

Static Public Member Functions

static void decode (const ByteString &_contents, ListedStringToStringMap &_results)

Detailed Description

Definition at line 34 of file HttpCollection.h.

Member Function Documentation

◆ 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); // .trim();
66
67 itPair++;
68 if (itPair != pair.end()) {
69 value = (*itPair); // .trim();
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: