taskrambler
v0.1.8
Web server and task management solution.
|
#include <time.h>
#include <stdlib.h>
#include <ctype.h>
#include <sys/types.h>
#include <string.h>
#include "http/message.h"
#include "http/request.h"
#include "http/response.h"
#include "class.h"
#include "commons.h"
Go to the source code of this file.
Macros | |
#define | ALPHAVAL(x) (tolower((x)) - 'a' + 0xa) |
#define | DIGITVAL(x) ((x) - '0') |
#define | ALNUMVAL(x) (isdigit((x))?DIGITVAL((x)):ALPHAVAL((x))) |
Functions | |
size_t | rfc1123Gmt (char *buffer, size_t _nbuf, const time_t *t) |
size_t | rfc1123GmtNow (char *buffer, size_t _nbuf) |
size_t | urldecode (char *buffer, size_t nbuffer) |
char | isHttpVersion (const char *str, size_t len) |
HttpMessage | httpGetMessage (const char *part1, size_t len1, const char *part2, size_t len2, const char *part3, size_t len3) |
Variables | |
static const char * | DAY_NAMES [] |
static const char * | MONTH_NAMES [] |
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 utils/http.c.
Definition at line 39 of file utils/http.c.
Referenced by urldecode().
#define ALPHAVAL | ( | x | ) | (tolower((x)) - 'a' + 0xa) |
Definition at line 37 of file utils/http.c.
#define DIGITVAL | ( | x | ) | ((x) - '0') |
Definition at line 38 of file utils/http.c.
HttpMessage httpGetMessage | ( | const char * | part1, |
size_t | len1, | ||
const char * | part2, | ||
size_t | len2, | ||
const char * | part3, | ||
size_t | len3 | ||
) |
Definition at line 127 of file utils/http.c.
References isHttpVersion().
Referenced by httpParserNewMessage().
char isHttpVersion | ( | const char * | str, |
size_t | len | ||
) |
Definition at line 112 of file utils/http.c.
Referenced by httpGetMessage(), and httpMessageHasValidVersion().
size_t rfc1123Gmt | ( | char * | buffer, |
size_t | _nbuf, | ||
const time_t * | t | ||
) |
Definition at line 53 of file utils/http.c.
References DAY_NAMES, and MONTH_NAMES.
Referenced by assetCtor(), httpResponseAsset(), and rfc1123GmtNow().
size_t rfc1123GmtNow | ( | char * | buffer, |
size_t | _nbuf | ||
) |
Definition at line 69 of file utils/http.c.
References rfc1123Gmt().
Referenced by httpWorkerAddCommonHeader().
size_t urldecode | ( | char * | buffer, |
size_t | nbuffer | ||
) |
Decode an url encoded string. This expects a valid url encoded string and it size as arguments, else the behaviour of this function is undefined. This function modifies the data in buffer. No copy is made. The reason for this is only performance.
Definition at line 84 of file utils/http.c.
References ALNUMVAL.
Referenced by httpParserPostVars().
|
static |
Definition at line 42 of file utils/http.c.
Referenced by rfc1123Gmt().
|
static |
Definition at line 44 of file utils/http.c.
Referenced by rfc1123Gmt().