diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-09-29 21:55:31 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-09-29 21:55:31 -0700 |
| commit | 25490a300910e357ac864a1916a4285e239fbf30 (patch) | |
| tree | 8d45f90b9cfaff3c038aeadadd219d3edf8acc54 /src/supplemental/http/http_api.h | |
| parent | c084742b80d6514b39824617a41eb16910c53cf4 (diff) | |
| download | nng-25490a300910e357ac864a1916a4285e239fbf30.tar.gz nng-25490a300910e357ac864a1916a4285e239fbf30.tar.bz2 nng-25490a300910e357ac864a1916a4285e239fbf30.zip | |
fixes #738 http server needs a way to collect request entity data
Diffstat (limited to 'src/supplemental/http/http_api.h')
| -rw-r--r-- | src/supplemental/http/http_api.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/supplemental/http/http_api.h b/src/supplemental/http/http_api.h index 71b24f54..a30399d2 100644 --- a/src/supplemental/http/http_api.h +++ b/src/supplemental/http/http_api.h @@ -101,6 +101,7 @@ extern int nni_http_req_copy_data(nni_http_req *, const void *, size_t); extern int nni_http_res_copy_data(nni_http_res *, const void *, size_t); extern int nni_http_req_set_data(nni_http_req *, const void *, size_t); extern int nni_http_res_set_data(nni_http_res *, const void *, size_t); +extern int nni_http_req_alloc_data(nni_http_req *, size_t); extern int nni_http_res_alloc_data(nni_http_res *, size_t); extern const char *nni_http_req_get_method(nni_http_req *); extern const char *nni_http_req_get_version(nni_http_req *); @@ -248,6 +249,11 @@ extern int nni_http_handler_init_static( // calls this for any handlers still registered with it if it is destroyed. extern void nni_http_handler_fini(nni_http_handler *); +// nni_http_handler_collect_body informs the server that it should collect +// the entitty data associated with the client request, and sets the maximum +// size to accept. +extern void nni_http_handler_collect_body(nni_http_handler *, bool, size_t); + // nni_http_handler_set_tree marks the handler as servicing the entire // tree (e.g. a directory), rather than just a leaf node. The handler // will probably need to inspect the URL of the request. |
