@@ -62,6 +62,9 @@ public:
/// is used, or if it is not known whether a secure
/// connection is used.
+ void setStatus(int status);
+ /// Set specific HTTP status code for the request.
+
private:
request_rec* _pRec;
};
@@ -137,6 +137,12 @@ bool ApacheRequestRec::secure()
}
+void ApacheRequestRec::setStatus(int status)
+{
+ _pRec->status = status;
+}
void ApacheRequestRec::copyHeaders(ApacheServerRequest& request)
{
const apr_array_header_t* arr = apr_table_elts(_pRec->headers_in);
@@ -47,6 +47,9 @@ void ApacheServerResponse::initApacheOutputStream()
_pApacheRequest->setContentType(getContentType());
+ int statusCode = static_cast<std::underlying_type<Poco::Net::HTTPResponse::HTTPStatus>::type>(getStatus());
+ _pApacheRequest->setStatus(statusCode);
std::vector<HTTPCookie> cookies;
getCookies(cookies);