summaryrefslogtreecommitdiff
path: root/src/libtipidee/tipidee_response_error_nofile.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-10-24 12:38:53 +0000
committerLaurent Bercot <ska@appnovation.com>2023-10-24 12:38:53 +0000
commit305385e06f90ca3216e1aa4e43b20dd7d53c1222 (patch)
tree899d3460b511567889d5e5d78f77931af572b5fb /src/libtipidee/tipidee_response_error_nofile.c
parent37d2f8cb438f68eaa1da8a56ea9ce5023091f128 (diff)
downloadtipidee-305385e06f90ca3216e1aa4e43b20dd7d53c1222.tar.xz
Make the switch to custom headers
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libtipidee/tipidee_response_error_nofile.c')
-rw-r--r--src/libtipidee/tipidee_response_error_nofile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libtipidee/tipidee_response_error_nofile.c b/src/libtipidee/tipidee_response_error_nofile.c
index 4f628ac..8a7cd53 100644
--- a/src/libtipidee/tipidee_response_error_nofile.c
+++ b/src/libtipidee/tipidee_response_error_nofile.c
@@ -8,7 +8,7 @@
#include <tipidee/method.h>
#include <tipidee/response.h>
-size_t tipidee_response_error_nofile (buffer *b, tipidee_rql const *rql, unsigned int status, char const *reason, char const *text, uint32_t options, tain const *stamp)
+size_t tipidee_response_error_nofile (buffer *b, tipidee_rql const *rql, unsigned int status, char const *reason, char const *text, tipidee_response_header const *rhdr, uint32_t rhdrn, uint32_t options, tain const *stamp)
{
static char const txt1[] = "<html>\n<head><title>" ;
static char const txt2[] = "</title></head>\n<body>\n<h1> " ;
@@ -16,7 +16,7 @@ size_t tipidee_response_error_nofile (buffer *b, tipidee_rql const *rql, unsigne
static char const txt4[] = "\n</p>\n</body>\n</html>\n" ;
char fmt[SIZE_FMT] ;
size_t n = tipidee_response_status(b, rql, status, reason) ;
- n += tipidee_response_header_common_put(b, options, stamp) ;
+ n += tipidee_response_header_writeall(b, rhdr, rhdrn, options, stamp) ;
n += buffer_putsnoflush(b, "Content-Type: text/html; charset=UTF-8\r\n") ;
n += buffer_putsnoflush(b, "Content-Length: ") ;
n += buffer_putnoflush(b, fmt, size_fmt(fmt, text ? sizeof(txt1) + sizeof(txt2) + sizeof(txt3) + sizeof(txt4) - 4 + 2 * strlen(reason) + strlen(text) : 0)) ;