From 7575e07b9f10fc115b62022a9cc96098f072afac Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Sat, 6 Aug 2016 19:27:02 +0200 Subject: blaze822: keep a pointer to the original header, if we have it anyway --- blaze822.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'blaze822.c') diff --git a/blaze822.c b/blaze822.c index 84d56b4..5a98915 100644 --- a/blaze822.c +++ b/blaze822.c @@ -349,7 +349,7 @@ blaze822(char *file) mesg->msg = buf; mesg->end = end; - mesg->body = mesg->bodyend = mesg->bodychunk = 0; + mesg->body = mesg->bodyend = mesg->bodychunk = mesg->orig_header = 0; return mesg; } @@ -391,6 +391,7 @@ blaze822_mem(char *src, size_t len) mesg->msg = buf; mesg->end = end; mesg->bodychunk = 0; // src is not ours + mesg->orig_header = src; return mesg; } @@ -558,6 +559,7 @@ blaze822_mmap(char *file) mesg->msg = mesg->bodychunk = buf; mesg->end = end; mesg->bodyend = buf + len; + mesg->orig_header = 0; return mesg; @@ -578,6 +580,12 @@ blaze822_body(struct message *mesg) return mesg->body; } +char * +blaze822_orig_header(struct message *mesg) +{ + return mesg->orig_header; +} + size_t blaze822_bodylen(struct message *mesg) { -- cgit 1.4.1