-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add LimitRequestFields parameter in main configuration #1742
Conversation
I took a look at the logs but I don't get why the travis tests fail. |
Please add docs to reflect your changes and tests to insure that it works correctly. Also the test fail is unrelated to your code and part of a separate problem. |
Hello, What kind of test do you need? |
Just a simple test that covers it's usage. One that utilises your change and then confirms that it worked as it should. |
Hello, I configure my apache server with the following value :
This means that the server will only accept a maximum of 4 headers per HTTP request. Then I used apache benchmark to send HTTP requests, here is the result with only one header :
Then an other request with 5 headers. As you can see, the request returns a 400 HTTP error (HTTP/1.1 400 Bad Request) with this error message : The number of request header fields exceeds this server's limit
|
As for the module itself, here is what I configured in my hiera file :
And the result on the node :
|
Hi there, Happy new year ^^ Do I need to provide more informations on this subject? Are there still unclear points? Thanks |
@geekix Still needs tests to be implemented, simply add one where you set a limit and then test to ensure that you can't go over it. |
Hello, If you go over my last comments, you will find a test that shows that the limit works. Please tell me if you need more explanations. |
@geekix I feel that you misunderstand, When I say tests I mean automated ones that are built into the module. |
@david22swan I'm sorry, I don't know about automated tests. Can you please give me a hint? Thanks |
@geekix You should take a look at this test file: Look at line 388 to 400, it's the test for 'limitreqfieldsize'. |
I'll take a look, thanks for the advice |
I have added a test in the file apache_parameters_spec.rb. I hope it's what you expect. |
Add LimitRequestFields parameter in main configuration
Hello,
I need to configure this parameter : LimitRequestFields (http://httpd.apache.org/docs/current/mod/core.html#limitrequestfields) but it is not managed by your module yet.
So I took the liberty to add this parameter in the init.pp file (with a value at '100', which is the default value in apache) and in the httpd.conf template.
Successfully tested on Debian 8.9 and apache 2.4.10.
Thanks