Skip to content

Commit 08fd949

Browse files
committed
add LimitRequestLine parameter
1 parent 3d81219 commit 08fd949

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

manifests/init.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,9 @@
428428
# The `limitreqfieldsize` parameter sets the maximum ammount of _bytes_ that will
429429
# be allowed within a request header.
430430
#
431+
# @param limitreqline
432+
# The 'limitreqline' parameter sets the limit on the allowed size of a client's HTTP request-line
433+
#
431434
# @param ip
432435
# Specifies the ip address
433436
#
@@ -526,6 +529,7 @@
526529
Integer $max_keepalive_requests = $apache::params::max_keepalive_requests,
527530
Integer $limitreqfieldsize = 8190,
528531
Integer $limitreqfields = 100,
532+
Optional[Integer] $limitreqline = undef,
529533
Stdlib::Absolutepath $logroot = $apache::params::logroot,
530534
Optional[Stdlib::Filemode] $logroot_mode = $apache::params::logroot_mode,
531535
Apache::LogLevel $log_level = $apache::params::log_level,

spec/acceptance/apache_parameters_spec.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,22 @@ class { 'apache':
566566
end
567567
end
568568

569+
describe 'limitreqline' do
570+
pp = <<-MANIFEST
571+
class { 'apache':
572+
limitreqline => '8190',
573+
}
574+
MANIFEST
575+
it 'applys cleanly' do
576+
apply_manifest(pp, catch_failures: true)
577+
end
578+
579+
describe file(apache_hash['conf_file']) do
580+
it { is_expected.to be_file }
581+
it { is_expected.to contain 'LimitRequestLine 8190' }
582+
end
583+
end
584+
569585
describe 'file_e_tag' do
570586
pp = <<-MANIFEST
571587
class { 'apache':

templates/httpd.conf.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ MaxKeepAliveRequests <%= @max_keepalive_requests %>
1515
KeepAliveTimeout <%= @keepalive_timeout %>
1616
LimitRequestFieldSize <%= @limitreqfieldsize %>
1717
LimitRequestFields <%= @limitreqfields %>
18+
<% if @limitreqline -%>
19+
LimitRequestLine <%= @limitreqline %>
20+
<% end -%>
1821
<%# Actually >= 2.4.24, but the minor version is not provided -%>
1922
<%- if @http_protocol_options and scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%>
2023
HttpProtocolOptions <%= @http_protocol_options %>

0 commit comments

Comments
 (0)