diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-08-06 19:27:02 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-08-06 19:27:02 +0200 |
commit | 7575e07b9f10fc115b62022a9cc96098f072afac (patch) | |
tree | 8ebe1400131e84e7582f2da2c4602db09c212324 /blaze822.c | |
parent | f9226dde7b37064c235123d523a5c5a1a9b09f5d (diff) | |
download | mblaze-7575e07b9f10fc115b62022a9cc96098f072afac.tar.gz mblaze-7575e07b9f10fc115b62022a9cc96098f072afac.tar.xz mblaze-7575e07b9f10fc115b62022a9cc96098f072afac.zip |
blaze822: keep a pointer to the original header, if we have it anyway
Diffstat (limited to 'blaze822.c')
-rw-r--r-- | blaze822.c | 10 |
1 files changed, 9 insertions, 1 deletions
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) { |