From 35359f038f571dc46de3d14af72a2bc911fb0a24 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 18 Mar 2020 22:17:49 +0300 Subject: Implement brep-monitor --- web/apache/request.ixx | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 web/apache/request.ixx (limited to 'web/apache/request.ixx') diff --git a/web/apache/request.ixx b/web/apache/request.ixx deleted file mode 100644 index 3a1c01a..0000000 --- a/web/apache/request.ixx +++ /dev/null @@ -1,45 +0,0 @@ -// file : web/apache/request.ixx -*- C++ -*- -// license : MIT; see accompanying LICENSE file - -#include // ap_*() - -#include // stringbuf - -namespace web -{ - namespace apache - { - inline int request:: - flush () - { - if (std::stringbuf* b = dynamic_cast (out_buf_.get ())) - { - // Response content is buffered. - // - std::string s (b->str ()); - - if (!s.empty ()) - { - try - { - state (request_state::writing); - - if (ap_rwrite (s.c_str (), s.length (), rec_) < 0) - rec_->status = HTTP_REQUEST_TIME_OUT; - } - catch (const invalid_request& e) - { - rec_->status = e.status; - } - } - - out_.reset (); - out_buf_.reset (); - } - - return rec_->status == HTTP_OK || state_ >= request_state::writing - ? OK - : rec_->status; - } - } -} -- cgit v1.1