taskrambler
0.1.9
Web server and task management solution.
|
#include "class.h"
#include "http/message.h"
#include "queue.h"
#include "cbuf.h"
#include "stream.h"
#include "commons.h"
Go to the source code of this file.
Macros | |
#define | PARSER_MAX_BUF 131072 |
Enumerations | |
enum | HttpMessageState { HTTP_MESSAGE_GARBAGE =0, HTTP_MESSAGE_START, HTTP_MESSAGE_INTRO_DONE, HTTP_MESSAGE_HEADERS_DONE, HTTP_MESSAGE_DONE } |
Functions | |
CLASS (HttpParser) | |
ssize_t | httpParserParse (void *, Stream) |
void | httpParserRequestVars (HttpParser) |
void | httpParserHeader (HttpParser, const char *, const char *) |
void | httpParserNewMessage (HttpParser, const char *, const char *lend) |
size_t | httpParserBody (HttpParser, const char *, size_t) |
void | httpParserPostVars (HttpParser) |
Parse requests from an input stream.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file parser.h.
#define PARSER_MAX_BUF 131072 |
Definition at line 35 of file parser.h.
Referenced by httpWorkerCtor().
enum HttpMessageState |
Enumerator | |
---|---|
HTTP_MESSAGE_GARBAGE | |
HTTP_MESSAGE_START | |
HTTP_MESSAGE_INTRO_DONE | |
HTTP_MESSAGE_HEADERS_DONE | |
HTTP_MESSAGE_DONE |
Definition at line 38 of file parser.h.
size_t httpParserBody | ( | HttpParser | , |
const char * | , | ||
size_t | |||
) |
Definition at line 34 of file p_body.c.
References MIN.
Referenced by httpParserParse().
void httpParserHeader | ( | HttpParser | , |
const char * | , | ||
const char * | |||
) |
Definition at line 37 of file p_header.c.
References hashAdd(), memMalloc(), and interface::name.
Referenced by httpParserParse().
void httpParserNewMessage | ( | HttpParser | , |
const char * | , | ||
const char * | lend | ||
) |
Definition at line 28 of file new_message.c.
References httpGetMessage().
Referenced by httpParserParse().
ssize_t httpParserParse | ( | void * | , |
Stream | |||
) |
do we have form data??
then parse them...
enqueue current request
prepare for next request
Definition at line 41 of file http/parser/parse.c.
References cbufGetData(), cbufGetLine(), cbufGetRead(), cbufIncRead(), cbufIsEmpty(), cbufIsLocked(), cbufLock(), cbufRead(), cbufRelease(), cbufSetData(), cbufSkipNonAlpha(), CSTRA, FALSE, hashGet(), HTTP_MESSAGE_DONE, HTTP_MESSAGE_GARBAGE, HTTP_MESSAGE_HEADERS_DONE, HTTP_MESSAGE_INTRO_DONE, HTTP_MESSAGE_START, httpParserBody(), httpParserHeader(), httpParserNewMessage(), httpParserPostVars(), httpParserRequestVars(), MEM_FREE, memMalloc(), MIN, queuePut(), and TRUE.
Referenced by httpWorkerProcess().
void httpParserPostVars | ( | HttpParser | this | ) |
Definition at line 39 of file p_post_vars.c.
References hashAdd(), and urldecode().
Referenced by httpParserParse().
void httpParserRequestVars | ( | HttpParser | ) |
Definition at line 35 of file p_request_vars.c.
References hashAdd(), and memMalloc().
Referenced by httpParserParse().