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