|
45 | 45 | // The following lines define limits of the protocol. Exceeding these limits will lead to a 500 error
|
46 | 46 |
|
47 | 47 | // Maximum of header lines that are parsed
|
| 48 | +#ifndef HTTPS_REQUEST_MAX_HEADERS |
48 | 49 | #define HTTPS_REQUEST_MAX_HEADERS 20
|
| 50 | +#endif |
49 | 51 |
|
50 | 52 | // Maximum length of the request line (GET /... HTTP/1.1)
|
| 53 | +#ifndef HTTPS_REQUEST_MAX_REQUEST_LENGTH |
51 | 54 | #define HTTPS_REQUEST_MAX_REQUEST_LENGTH 128
|
| 55 | +#endif |
52 | 56 |
|
53 | 57 | // Maximum length of a header line (including name and value)
|
| 58 | +#ifndef HTTPS_REQUEST_MAX_HEADER_LENGTH |
54 | 59 | #define HTTPS_REQUEST_MAX_HEADER_LENGTH 384
|
| 60 | +#endif |
55 | 61 |
|
56 | 62 | // Chunk size used for reading data from the ssl-enabled socket
|
| 63 | +#ifndef HTTPS_CONNECTION_DATA_CHUNK_SIZE |
57 | 64 | #define HTTPS_CONNECTION_DATA_CHUNK_SIZE 512
|
| 65 | +#endif |
58 | 66 |
|
59 | 67 | // Size (in bytes) of the Connection:keep-alive Cache (we need to be able to
|
60 | 68 | // store-and-forward the response to calculate the content-size)
|
| 69 | +#ifndef HTTPS_KEEPALIVE_CACHESIZE |
61 | 70 | #define HTTPS_KEEPALIVE_CACHESIZE 1400
|
| 71 | +#endif |
62 | 72 |
|
63 | 73 | // Timeout for an HTTPS connection without any transmission
|
| 74 | +#ifndef HTTPS_CONNECTION_TIMEOUT |
64 | 75 | #define HTTPS_CONNECTION_TIMEOUT 20000
|
| 76 | +#endif |
65 | 77 |
|
66 | 78 | // Timeout used to wait for shutdown of SSL connection (ms)
|
67 | 79 | // (time for the client to return notify close flag) - without it, truncation attacks might be possible
|
| 80 | +#ifndef HTTPS_SHUTDOWN_TIMEOUT |
68 | 81 | #define HTTPS_SHUTDOWN_TIMEOUT 5000
|
| 82 | +#endif |
69 | 83 |
|
70 | 84 | // Length of a SHA1 hash
|
| 85 | +#ifndef HTTPS_SHA1_LENGTH |
71 | 86 | #define HTTPS_SHA1_LENGTH 20
|
| 87 | +#endif |
72 | 88 |
|
73 | 89 | #endif /* SRC_HTTPSSERVERCONSTANTS_HPP_ */
|
0 commit comments