diff options
| author | Drew DeVault <sir@cmpwn.com> | 2020-09-26 15:51:28 -0400 |
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2020-09-26 15:51:28 -0400 |
| commit | 6bc9c4deb90e8daa228d792b23a3e61b7bebdb78 (patch) | |
| tree | e81beb74f44b1809ead547cbb5aad39d6594e65e /include | |
| parent | 165e3c02fc9c9834b320c3a333c942ee87ffed1b (diff) | |
| download | gmnisrv-6bc9c4deb90e8daa228d792b23a3e61b7bebdb78.tar.gz gmnisrv-6bc9c4deb90e8daa228d792b23a3e61b7bebdb78.tar.xz gmnisrv-6bc9c4deb90e8daa228d792b23a3e61b7bebdb78.zip | |
Implement autoindex option
Diffstat (limited to 'include')
| -rw-r--r-- | include/config.h | 5 | ||||
| -rw-r--r-- | include/server.h | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/include/config.h b/include/config.h index 83253f7..1a0b17c 100644 --- a/include/config.h +++ b/include/config.h @@ -2,6 +2,7 @@ #define GMNISRV_CONFIG #include <arpa/inet.h> #include <openssl/x509.h> +#include <stdbool.h> struct gmnisrv_tls { char *store; @@ -13,8 +14,12 @@ struct gmnisrv_tls { struct gmnisrv_host { char *hostname; char *root; + char *index; + bool autoindex; + X509 *x509; EVP_PKEY *pkey; + struct gmnisrv_host *next; }; diff --git a/include/server.h b/include/server.h index 884f210..c6f4a38 100644 --- a/include/server.h +++ b/include/server.h @@ -33,7 +33,7 @@ struct gmnisrv_client { enum response_state state; enum gemini_status status; char *meta; - int bodyfd; + FILE *body; size_t bbytes; struct gmnisrv_host *host; @@ -70,7 +70,7 @@ void disconnect_client(struct gmnisrv_server *server, void serve_request(struct gmnisrv_client *client); bool request_validate(struct gmnisrv_client *client, char **path); void client_submit_response(struct gmnisrv_client *client, - enum gemini_status status, const char *meta, int bodyfd); + enum gemini_status status, const char *meta, FILE *body); void client_oom(struct gmnisrv_client *client); #endif |
