You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
54 lines
1.4 KiB
1 year ago
|
/**
|
||
|
* HTTPD config defines
|
||
|
*/
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#ifndef GIT_HASH
|
||
|
#define GIT_HASH "unknown"
|
||
|
#endif
|
||
|
|
||
|
// we must not use this macro outside the library, as the git hash is not defined there
|
||
|
#define HTTPDVER "0.4+MightyPork/libesphttpd#" GIT_HASH
|
||
|
|
||
|
// default servername
|
||
|
#ifndef HTTPD_SERVERNAME
|
||
|
#define HTTPD_SERVERNAME "SpriteHTTPD " HTTPDVER
|
||
|
#endif
|
||
|
|
||
|
//Max length of request head. This is statically allocated for each connection.
|
||
|
#ifndef HTTPD_MAX_HEAD_LEN
|
||
|
#define HTTPD_MAX_HEAD_LEN 1024
|
||
|
#endif
|
||
|
|
||
|
//Max post buffer len. This is dynamically malloc'ed if needed.
|
||
|
#ifndef HTTPD_MAX_POST_LEN
|
||
|
#define HTTPD_MAX_POST_LEN 2048
|
||
|
#endif
|
||
|
|
||
|
//Max send buffer len. This is allocated on the stack.
|
||
|
#ifndef HTTPD_MAX_SENDBUFF_LEN
|
||
|
#define HTTPD_MAX_SENDBUFF_LEN 2048
|
||
|
#endif
|
||
|
|
||
|
//Receive buffer
|
||
|
#ifndef HTTPD_RECV_BUF_LEN
|
||
|
#define HTTPD_RECV_BUF_LEN 2048
|
||
|
#endif
|
||
|
|
||
|
//If some data can't be sent because the underlaying socket doesn't accept the data (like the nonos
|
||
|
//layer is prone to do), we put it in a backlog that is dynamically malloc'ed. This defines the max
|
||
|
//size of the backlog.
|
||
|
#ifndef HTTPD_MAX_BACKLOG_SIZE
|
||
|
#define HTTPD_MAX_BACKLOG_SIZE (4*1024)
|
||
|
#endif
|
||
|
|
||
|
//Max len of CORS token. This is allocated in each connection
|
||
|
#ifndef HTTPD_MAX_CORS_TOKEN_LEN
|
||
|
#define HTTPD_MAX_CORS_TOKEN_LEN 256
|
||
|
#endif
|
||
|
|
||
|
#ifndef HTTPD_MAX_CONNECTIONS
|
||
|
#define HTTPD_MAX_CONNECTIONS 4
|
||
|
#endif
|