Yes, you can simply queue any response. As long as you do this on the _first_ callback to the access handler (and as long as the client expected "100 continue"), this will provide a proper error message and prevent the upload.
Happy hacking! Christian On 3/19/19 2:12 PM, Дмитрий Степанов wrote: > Hello! > > Is it possible to abort big POST request from the client (actually > client uses chunked transfer encoding) by sending 500 (or whenever else) > error with body that contains useful information? > I'm able to abort POST request in MHD_AccessHandlerCallback simply > returning MHD_NO, but in that case libmicrohttpd just resets the connection. > If i try to send a response in MHD_AccessHandlerCallback while > *upload_data_size is not zero (client's POST request in > progress)- MHD_queue_response returns MHD_NO (reponse is not actually > sent). > > Thanks!
signature.asc
Description: OpenPGP digital signature
