We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fe7e372 + 5856b5f commit 326bea4Copy full SHA for 326bea4
1 file changed
http-backend.c
@@ -538,15 +538,19 @@ static void service_rpc(char *service_name)
538
539
static NORETURN void die_webcgi(const char *err, va_list params)
540
{
541
- char buffer[1000];
+ static int dead;
542
543
- http_status(500, "Internal Server Error");
544
- hdr_nocache();
545
- end_headers();
+ if (!dead) {
+ char buffer[1000];
+ dead = 1;
546
547
- vsnprintf(buffer, sizeof(buffer), err, params);
548
- fprintf(stderr, "fatal: %s\n", buffer);
549
- exit(0);
+ vsnprintf(buffer, sizeof(buffer), err, params);
+ fprintf(stderr, "fatal: %s\n", buffer);
+ http_status(500, "Internal Server Error");
550
+ hdr_nocache();
551
+ end_headers();
552
+ }
553
+ exit(0); /* we successfully reported a failure ;-) */
554
}
555
556
static char* getdir(void)
0 commit comments