Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ContentSizeExceeded.cs
1using System.Threading.Tasks;
2using System.Xml;
4
6{
11 {
16 : base()
17 {
18 }
19
27 : base(Xml, Parent, Document)
28 {
29 }
30
34 public override string LocalName => nameof(ContentSizeExceeded);
35
43 public override WafAction Create(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document) => new ContentSizeExceeded(Xml, Parent, Document);
44
50 public override Task<WafResult?> Review(ProcessingState State)
51 {
52 if (State.Request.HasData)
53 {
54 long Size = State.Request.DataStream.Length;
55 return this.Review(State, Size);
56 }
57 else
58 return Task.FromResult<WafResult?>(null);
59 }
60 }
61}
Checks if the content size of the current request exceeds a limit.
override WafAction Create(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
Creates a WAF action from its XML definition.
override string LocalName
XML Local Name for the XML element defining the action.
ContentSizeExceeded()
Checks if the content size of the current request exceeds a limit.
override Task< WafResult?> Review(ProcessingState State)
Reviews the processing state, and returns a WAF result, if any.
ContentSizeExceeded(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
Checks if the content size of the current request exceeds a limit.
Abstract base class for limit comparisons.
Contains the current state of a review process.
HttpRequest Request
Current HTTP Request
Abstract base class for Web Application Firewall actions.
Definition: WafAction.cs:17
WebApplicationFirewall Document
Web Application Firewall document.
Definition: WafAction.cs:60
Web Application Firewall for HttpServer.
WafResult
Actions that a Web Server can take after reviewing a request.