I need to determine if I can examine the Content Length value in an HTTP header to prevent a web server from recieving invalid requests.
Here is the challenge:
I have an application out in the world that is submitting a blank XML document to one of my web services and it is causing the server to throw an exception. The exceptions are happening with enough frequency that the server is getting overwhelmed. I want to prevent these requests from reaching the server and I'm hoping that I can use CSS to identify the requests and send back an error (or send to another server to handle) when the METHOD=POST and Content Length = 0.
Is this possible?
I'm glad the information helped you out!
The following link explains the options when configuring header-field-rules on the CSS.
If you wish to truly understand the options in depth you can also read the HTTP RFC.
I hope you have a great weekend as well!