23 #include <core/exception.h>
24 #include <webview/reply.h>
61 bool WebReply::caching_default_ =
true;
71 caching_ = caching_default_;
88 caching_default_ = caching;
125 headers_[header] = content;
134 std::string::size_type pos;
135 if ((pos = header_string.find(
":")) != std::string::npos) {
136 std::string header = header_string.substr(0, pos);
138 if (header_string[pos + 1] ==
' ') {
139 content = header_string.substr(pos + 2);
141 content = header_string.substr(pos + 1);
143 headers_[header] = content;
145 throw Exception(
"Invalid header '%s'", header_string.c_str());
185 headers_[
"Cache-Control"] =
"no-cache, no-store, must-revalidate, max-age=0";
256 va_start(args, format);
258 if (vasprintf(&s, format, args) != -1) {
297 std::string::size_type
300 return _body.length();