| Revision 926,
1.1 KB
checked in by ben, 6 years ago
(diff) |
|
Contribute code: SMTP client, HTTP server, Database drivers, Web app framework, refs #6
|
| Line | |
|---|
| 1 | // -------------------------------------------------------------------------- |
|---|
| 2 | // |
|---|
| 3 | // File |
|---|
| 4 | // Name: HTTPQueryDecoder.h |
|---|
| 5 | // Purpose: Utility class to decode HTTP query strings |
|---|
| 6 | // Created: 26/3/04 |
|---|
| 7 | // |
|---|
| 8 | // -------------------------------------------------------------------------- |
|---|
| 9 | |
|---|
| 10 | #ifndef HTTPQUERYDECODER__H |
|---|
| 11 | #define HTTPQUERYDECODER__H |
|---|
| 12 | |
|---|
| 13 | #include "HTTPRequest.h" |
|---|
| 14 | |
|---|
| 15 | // -------------------------------------------------------------------------- |
|---|
| 16 | // |
|---|
| 17 | // Class |
|---|
| 18 | // Name: HTTPQueryDecoder |
|---|
| 19 | // Purpose: Utility class to decode HTTP query strings |
|---|
| 20 | // Created: 26/3/04 |
|---|
| 21 | // |
|---|
| 22 | // -------------------------------------------------------------------------- |
|---|
| 23 | class HTTPQueryDecoder |
|---|
| 24 | { |
|---|
| 25 | public: |
|---|
| 26 | HTTPQueryDecoder(HTTPRequest::Query_t &rDecodeInto); |
|---|
| 27 | ~HTTPQueryDecoder(); |
|---|
| 28 | private: |
|---|
| 29 | // no copying |
|---|
| 30 | HTTPQueryDecoder(const HTTPQueryDecoder &); |
|---|
| 31 | HTTPQueryDecoder &operator=(const HTTPQueryDecoder &); |
|---|
| 32 | public: |
|---|
| 33 | |
|---|
| 34 | void DecodeChunk(const char *pQueryString, int QueryStringSize); |
|---|
| 35 | void Finish(); |
|---|
| 36 | |
|---|
| 37 | private: |
|---|
| 38 | HTTPRequest::Query_t &mrDecodeInto; |
|---|
| 39 | std::string mCurrentKey; |
|---|
| 40 | std::string mCurrentValue; |
|---|
| 41 | bool mInKey; |
|---|
| 42 | char mEscaped[4]; |
|---|
| 43 | int mEscapedState; |
|---|
| 44 | }; |
|---|
| 45 | |
|---|
| 46 | #endif // HTTPQUERYDECODER__H |
|---|
| 47 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.