Http return codes are relevant only for request with fast response time. It helps the requestor get a quick status 200 is all good, 3xx something temporary, 4xx client has made some mistakes and 5xx server faulted.
Unfortunately this design doesn't map well to requests which take significant execution time. The easiest way to solve this is respond with 200 OK and then the body tells you whether it succeeded or not. This is not something which is defined in any place nor is it considered bad. Hence if you are writing a mod_perl handler for such an endpoint you return success immediately and then start processing the request. In most cases this is simply a matter of doing $r->print on the headers followed by print of two new lines. On Tue, May 13, 2025, 2:33 PM Vincent Veyron <vv.li...@wanadoo.fr> wrote: > On Wed, 23 Apr 2025 15:06:44 -0500 > Mithun Bhattacharya <mit...@gmail.com> wrote: > > Hi Mithun, > > In a recent thread, you wrote : > > > > > mod_perl code is where you are sending the http return status to make > sure > > the client doesn't timeout waiting for the server to respond. > > > > Could you explain how this is done, I thought one had to send the content > with the headers? > > I have a function in my web application which allows users to download the > entirety of their data in the form of a postgresql dump, wrapped in a zip > file. The files are getting bigger, and take more time to generate and > download, so I'm going to hit the timeout one day. > > > -- > Bien à vous, Vincent Veyron > > https://marica.fr/ > Logiciel de gestion des sinistres assurances, des dossiers contentieux et > des contrats pour le service juridique >