http_server_misc.c
error_t socketSend(Socket *socket, const void *data, size_t length, size_t *written, uint_t flags)
Send data to a connected socket.
Definition: socket.c:1486
Path manipulation helper functions.
String manipulation helper functions.
error_t httpFormatResponseHeader(HttpConnection *connection, char_t *buffer)
Format HTTP response header.
Definition: http_server_misc.c:778
HTTP server (HyperText Transfer Protocol)
char_t * strTrimWhitespace(char_t *s)
Removes all leading and trailing whitespace from a string.
Definition: str.c:78
void strRemoveTrailingSpace(char_t *s)
Removes all trailing whitespace from a string.
Definition: str.c:119
void httpParseConnectionField(HttpConnection *connection, char_t *value)
Parse Connection header field.
Definition: http_server_misc.c:499
error_t httpDecodePercentEncodedString(const char_t *input, char_t *output, size_t outputSize)
Decode a percent-encoded string.
Definition: http_server_misc.c:1134
void httpParseContentTypeField(HttpConnection *connection, char_t *value)
Parse Content-Type header field.
Definition: http_server_misc.c:545
error_t socketReceive(Socket *socket, void *data, size_t size, size_t *received, uint_t flags)
Receive data from a connected socket.
Definition: socket.c:1692
void httpParseAuthorizationField(HttpConnection *connection, char_t *value)
Parse Authorization header field.
Definition: http_server_auth.c:197
error_t httpReceive(HttpConnection *connection, void *data, size_t size, size_t *received, uint_t flags)
Receive data from the client.
Definition: http_server_misc.c:995
const char_t * mimeGetType(const char_t *filename)
Get the MIME type from a given extension.
Definition: mime.c:113
HTTP server (miscellaneous functions)
void httpParseCookieField(HttpConnection *connection, char_t *value)
Parse Cookie header field.
Definition: http_server_misc.c:650
error_t tlsRead(TlsContext *context, void *data, size_t size, size_t *received, uint_t flags)
Receive application data from a the remote host using TLS.
Definition: tls.c:1989
error_t httpSend(HttpConnection *connection, const void *data, size_t length, uint_t flags)
Send data to the client.
Definition: http_server_misc.c:947
size_t httpAddAuthenticateField(HttpConnection *connection, char_t *output)
Format WWW-Authenticate header field.
Definition: http_server_auth.c:399
HTTP authentication.
error_t strSafeCopy(char_t *dest, const char_t *src, size_t destSize)
Copy string.
Definition: str.c:172
#define HTTP_SERVER_QUERY_STRING_MAX_LEN
Definition: http_server.h:209
void httpGetAbsolutePath(HttpConnection *connection, const char_t *relative, char_t *absolute, size_t maxLen)
Retrieve the full pathname to the specified resource.
Definition: http_server_misc.c:1079
void httpConvertArrayToHexString(const uint8_t *input, size_t inputLen, char_t *output)
Convert byte array to hex string.
Definition: http_server_misc.c:1193
bool_t httpCompExtension(const char_t *filename, const char_t *extension)
Compare filename extension.
Definition: http_server_misc.c:1100
error_t tlsWrite(TlsContext *context, const void *data, size_t length, size_t *written, uint_t flags)
Send application data to the remote host using TLS.
Definition: tls.c:1854
error_t httpReadRequestHeader(HttpConnection *connection)
Read HTTP request header and parse its contents.
Definition: http_server_misc.c:83
void httpParseHeaderField(HttpConnection *connection, const char_t *name, char_t *value)
Parse HTTP header field.
Definition: http_server_misc.c:419
MIME (Multipurpose Internet Mail Extensions)
error_t httpReadHeaderField(HttpConnection *connection, char_t *buffer, size_t size, char_t *firstChar)
Read multiple-line header field.
Definition: http_server_misc.c:317
error_t httpReadChunkSize(HttpConnection *connection)
Read chunk-size field from the input stream.
Definition: http_server_misc.c:664
error_t httpParseRequestLine(HttpConnection *connection, char_t *requestLine)
Parse Request-Line.
Definition: http_server_misc.c:200
TCP/IP stack core.
error_t socketSetTimeout(Socket *socket, systime_t timeout)
Set timeout value for blocking operations.
Definition: socket.c:148
void httpParseAcceptEncodingField(HttpConnection *connection, char_t *value)
Parse Accept-Encoding header field.
Definition: http_server_misc.c:614
Debugging facilities.
void pathCombine(char_t *path, const char_t *more, size_t maxLen)
Concatenate two paths.
Definition: path.c:394
void httpInitResponseHeader(HttpConnection *connection)
Initialize response header.
Definition: http_server_misc.c:745