diff --git a/CitadelCore/CitadelCore/CitadelCore.csproj b/CitadelCore/CitadelCore/CitadelCore.csproj
index 6439771..e4734d6 100644
--- a/CitadelCore/CitadelCore/CitadelCore.csproj
+++ b/CitadelCore/CitadelCore/CitadelCore.csproj
@@ -12,11 +12,11 @@
https://github.com/TechnikEmpire/CitadelCore
proxy filtering content-filtering transparent-proxy
- Fixes several issues. See github release for more details.
+ Fixes issues with classification and next action directives regarding http responses.
Transparent filtering HTTP/S and Websocket/WebsocketSecure proxy.
- 1.2.12
- 1.2.12.0
- 1.2.12.0
+ 1.2.13
+ 1.2.13.0
+ 1.2.13.0
diff --git a/CitadelCore/CitadelCore/Net/Handlers/FilterHttpResponseHandler.cs b/CitadelCore/CitadelCore/Net/Handlers/FilterHttpResponseHandler.cs
index f09227e..f9efe9a 100644
--- a/CitadelCore/CitadelCore/Net/Handlers/FilterHttpResponseHandler.cs
+++ b/CitadelCore/CitadelCore/Net/Handlers/FilterHttpResponseHandler.cs
@@ -300,9 +300,9 @@ public override async Task Handle(HttpContext context)
string responseBlockResponseContentType = string.Empty;
byte[] responseBlockResponse = null;
- m_msgBeginCb?.Invoke(reqUrl, resHeaderBuilder.ToString(), m_nullBody, context.Request.IsHttps ? MessageType.Https : MessageType.Http, MessageDirection.Request, out responseNextAction, out responseBlockResponseContentType, out responseBlockResponse);
+ m_msgBeginCb?.Invoke(reqUrl, resHeaderBuilder.ToString(), m_nullBody, context.Request.IsHttps ? MessageType.Https : MessageType.Http, MessageDirection.Response, out responseNextAction, out responseBlockResponseContentType, out responseBlockResponse);
- if(requestNextAction == ProxyNextAction.DropConnection)
+ if(responseNextAction == ProxyNextAction.DropConnection)
{
if(responseBlockResponse != null)
{
@@ -318,7 +318,7 @@ public override async Task Handle(HttpContext context)
}
}
- if(requestNextAction == ProxyNextAction.AllowButRequestContentInspection)
+ if(responseNextAction == ProxyNextAction.AllowButRequestContentInspection)
{
using(var upstreamResponseStream = await response.Content.ReadAsStreamAsync())
{
@@ -337,7 +337,7 @@ public override async Task Handle(HttpContext context)
bool shouldBlockResponse = false;
responseBlockResponseContentType = string.Empty;
responseBlockResponse = null;
- m_msgEndCb?.Invoke(reqUrl, reqHeaderBuilder.ToString(), responseBody, context.Request.IsHttps ? MessageType.Https : MessageType.Http, MessageDirection.Request, out shouldBlockResponse, out responseBlockResponseContentType, out responseBlockResponse);
+ m_msgEndCb?.Invoke(reqUrl, resHeaderBuilder.ToString(), responseBody, context.Request.IsHttps ? MessageType.Https : MessageType.Http, MessageDirection.Response, out shouldBlockResponse, out responseBlockResponseContentType, out responseBlockResponse);
if(shouldBlockResponse)
{