diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-12-08 18:12:28 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-12-08 18:12:28 +0100 |
commit | 7e84b5570adeaa027f8c7861caf6af7943edcd0b (patch) | |
tree | ed861b2116ba354321829da3fcb2dc1f8ee93cee /src/mhd/mhd_responses.c | |
parent | ed7379d235b39d71e4cd94f90b52627c32c6d8e7 (diff) | |
download | exchange-7e84b5570adeaa027f8c7861caf6af7943edcd0b.tar.xz |
fix error handling for very large uploads, fix re-generation of /keys response after Expires expires
Diffstat (limited to 'src/mhd/mhd_responses.c')
-rw-r--r-- | src/mhd/mhd_responses.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/mhd/mhd_responses.c b/src/mhd/mhd_responses.c index 5b99dd128..2918440a2 100644 --- a/src/mhd/mhd_responses.c +++ b/src/mhd/mhd_responses.c @@ -419,24 +419,10 @@ TALER_MHD_reply_with_ec (struct MHD_Connection *connection, MHD_RESULT TALER_MHD_reply_request_too_large (struct MHD_Connection *connection) { - struct MHD_Response *response; - - response = MHD_create_response_from_buffer (0, - NULL, - MHD_RESPMEM_PERSISTENT); - if (NULL == response) - return MHD_NO; - TALER_MHD_add_global_headers (response); - - { - MHD_RESULT ret; - - ret = MHD_queue_response (connection, - MHD_HTTP_REQUEST_ENTITY_TOO_LARGE, - response); - MHD_destroy_response (response); - return ret; - } + return TALER_MHD_reply_with_error (connection, + MHD_HTTP_REQUEST_ENTITY_TOO_LARGE, + TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT, + NULL); } |