From 4eb98a5a169e2debf22f5222bd70311dd1bae297 Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Mon, 13 Feb 2012 17:55:52 +0100 Subject: [PATCH] fixed bug in new response handling --- include/interface/http_intro.h | 22 ++++++++++++++++++++++ src/http/response/writer/write.c | 3 +++ 2 files changed, 25 insertions(+) create mode 100644 include/interface/http_intro.h diff --git a/include/interface/http_intro.h b/include/interface/http_intro.h new file mode 100644 index 0000000..cc02625 --- /dev/null +++ b/include/interface/http_intro.h @@ -0,0 +1,22 @@ +#ifndef __HTTP_INTRO_H__ +#define __HTTP_INTRO_H__ + +#include + +typedef size_t (* fptr_httpIntroSizeGet)(void *); +typedef char * (* fptr_httpIntroToString)(void *, char *); + +extern const struct interface i_HttpIntro; + +struct i_HttpIntro { + const struct interface * const _; + fptr_httpIntroSizeGet sizeGet; + fptr_httpIntroToString toString; +}; + +extern size_t httpIntroSizeGet(void *); +extern char * httpIntroToString(void *, char *); + +#endif // __HTTP_INTRO_H__ + +// vim: set ts=4 sw=4: diff --git a/src/http/response/writer/write.c b/src/http/response/writer/write.c index 7aeafcc..b5cee5d 100644 --- a/src/http/response/writer/write.c +++ b/src/http/response/writer/write.c @@ -111,6 +111,9 @@ httpResponseWriterWrite(HttpResponseWriter this, int fd) this->written += temp; this->pstart += temp; + + this->pstart = (1024 == this->pstart)? + 0 : this->pstart; } break;