diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-04-17 01:29:36 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-04-17 01:29:36 +0200 |
commit | 5a321621f40d09b4f38bdd6dd43ee6580915fba2 (patch) | |
tree | af62e2b0c8e7751657bcf9d2714af2f8a571514a /src/exchange/taler-exchange-httpd_responses.h | |
parent | 0b3abbd30487ff1c5e9ce9be5561511fcf760f4f (diff) | |
download | exchange-5a321621f40d09b4f38bdd6dd43ee6580915fba2.tar.gz exchange-5a321621f40d09b4f38bdd6dd43ee6580915fba2.tar.bz2 exchange-5a321621f40d09b4f38bdd6dd43ee6580915fba2.zip |
implement #4982
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.h')
-rw-r--r-- | src/exchange/taler-exchange-httpd_responses.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_responses.h b/src/exchange/taler-exchange-httpd_responses.h index 83dafdca3..091d43862 100644 --- a/src/exchange/taler-exchange-httpd_responses.h +++ b/src/exchange/taler-exchange-httpd_responses.h @@ -33,6 +33,7 @@ #include "taler-exchange-httpd.h" #include "taler-exchange-httpd_db.h" + /** * Add headers we want to return in every response. * Useful for testing, like if we want to always close @@ -45,6 +46,28 @@ TEH_RESPONSE_add_global_headers (struct MHD_Response *response); /** + * Try to compress a response body. Updates @a buf and @buf_size. + * + * @param[in,out] buf pointer to body to compress + * @param[in,out] buf_size pointer to initial size of @a buf + * @return #MHD_TES if @a buf was compressed + */ +int +TEH_RESPONSE_body_compress (void **buf, + size_t *buf_size); + + +/** + * Is HTTP body deflate compression supported by the client? + * + * @param connection connection to check + * @return #MHD_YES if 'deflate' compression is allowed + */ +int +TEH_RESPONSE_can_compress (struct MHD_Connection *connection); + + +/** * Send JSON object as response. * * @param connection the MHD connection |