mirror of
https://github.com/matrix-construct/construct
synced 2025-02-18 09:40:12 +01:00
ircd: In runtime debugmode, log HTTP errors at the error level.
This commit is contained in:
parent
c95edb5d78
commit
ff2903900b
1 changed files with 12 additions and 0 deletions
|
@ -681,6 +681,18 @@ try
|
|||
}
|
||||
catch(const http::error &e)
|
||||
{
|
||||
if(ircd::debugmode) log::error
|
||||
{
|
||||
"socket(%p) local[%s] remote[%s] HTTP %d %s `%s' :%s",
|
||||
sock.get(),
|
||||
string(local(*this)),
|
||||
string(remote(*this)),
|
||||
int(e.code),
|
||||
http::status(e.code),
|
||||
head.uri,
|
||||
e.content
|
||||
};
|
||||
|
||||
resource::response
|
||||
{
|
||||
*this, e.content, "text/html; charset=utf8", e.code, e.headers
|
||||
|
|
Loading…
Add table
Reference in a new issue