mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 18:42:41 +01:00
This commit is contained in:
committed by
Aleksandar Fabijanic
parent
256b6855fa
commit
ec8a38f3ba
@@ -62,6 +62,9 @@ public:
|
|||||||
/// is used, or if it is not known whether a secure
|
/// is used, or if it is not known whether a secure
|
||||||
/// connection is used.
|
/// connection is used.
|
||||||
|
|
||||||
|
void setStatus(int status);
|
||||||
|
/// Set specific HTTP status code for the request.
|
||||||
|
|
||||||
private:
|
private:
|
||||||
request_rec* _pRec;
|
request_rec* _pRec;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -137,6 +137,12 @@ bool ApacheRequestRec::secure()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ApacheRequestRec::setStatus(int status)
|
||||||
|
{
|
||||||
|
_pRec->status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ApacheRequestRec::copyHeaders(ApacheServerRequest& request)
|
void ApacheRequestRec::copyHeaders(ApacheServerRequest& request)
|
||||||
{
|
{
|
||||||
const apr_array_header_t* arr = apr_table_elts(_pRec->headers_in);
|
const apr_array_header_t* arr = apr_table_elts(_pRec->headers_in);
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ void ApacheServerResponse::initApacheOutputStream()
|
|||||||
|
|
||||||
_pApacheRequest->setContentType(getContentType());
|
_pApacheRequest->setContentType(getContentType());
|
||||||
|
|
||||||
|
int statusCode = static_cast<std::underlying_type<Poco::Net::HTTPResponse::HTTPStatus>::type>(getStatus());
|
||||||
|
_pApacheRequest->setStatus(statusCode);
|
||||||
|
|
||||||
std::vector<HTTPCookie> cookies;
|
std::vector<HTTPCookie> cookies;
|
||||||
getCookies(cookies);
|
getCookies(cookies);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user