diff --git a/README.md b/README.md index e500cb4f9..e88055652 100644 --- a/README.md +++ b/README.md @@ -1344,6 +1344,8 @@ Set up a virtual host with [WSGI](https://code.google.com/p/modwsgi/). `wsgi_pass_authorization` the WSGI application handles authorisation instead of Apache when set to 'On'. For more information see [here] (http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIPassAuthorization.html). Defaults to 'undef' where apache will set the defaults setting to 'Off'. +`wsgi_chunked_request` enables support for chunked requests. Defaults to 'undef'. + To set up a virtual host with WSGI ```puppet @@ -1358,6 +1360,7 @@ To set up a virtual host with WSGI }, wsgi_process_group => 'wsgi', wsgi_script_aliases => { '/' => '/var/www/demo.wsgi' }, + wsgi_chunked_request => 'On', } ``` diff --git a/manifests/vhost.pp b/manifests/vhost.pp index 23360bf69..adfd0ac5f 100644 --- a/manifests/vhost.pp +++ b/manifests/vhost.pp @@ -89,6 +89,7 @@ $wsgi_process_group = undef, $wsgi_script_aliases = undef, $wsgi_pass_authorization = undef, + $wsgi_chunked_request = undef, $custom_fragment = undef, $itk = undef, $action = undef, diff --git a/spec/acceptance/vhost_spec.rb b/spec/acceptance/vhost_spec.rb index 9ecf34775..5d1fbd078 100644 --- a/spec/acceptance/vhost_spec.rb +++ b/spec/acceptance/vhost_spec.rb @@ -1074,7 +1074,8 @@ class { 'apache::mod::wsgi': } wsgi_daemon_process_options => {processes => '2'}, wsgi_process_group => 'nobody', wsgi_script_aliases => { '/test' => '/test1' }, - wsgi_pass_authorization => 'On', + wsgi_pass_authorization => 'On', + wsgi_chunked_request => 'On', } EOS apply_manifest(pp, :catch_failures => true) @@ -1094,7 +1095,8 @@ class { 'apache::mod::wsgi': } wsgi_import_script_options => { application-group => '%{GLOBAL}', process-group => 'wsgi' }, wsgi_process_group => 'nobody', wsgi_script_aliases => { '/test' => '/test1' }, - wsgi_pass_authorization => 'On', + wsgi_pass_authorization => 'On', + wsgi_chunked_request => 'On', } EOS apply_manifest(pp, :catch_failures => true) @@ -1108,6 +1110,7 @@ class { 'apache::mod::wsgi': } it { is_expected.to contain 'WSGIProcessGroup nobody' } it { is_expected.to contain 'WSGIScriptAlias /test "/test1"' } it { is_expected.to contain 'WSGIPassAuthorization On' } + it { is_expected.to contain 'WSGIChunkedRequest On' } end end diff --git a/spec/defines/vhost_spec.rb b/spec/defines/vhost_spec.rb index d3e49bb3b..7141dc651 100644 --- a/spec/defines/vhost_spec.rb +++ b/spec/defines/vhost_spec.rb @@ -225,6 +225,7 @@ 'user' => 'someuser', 'group' => 'somegroup' }, + 'wsgi_chunked_request' => 'On', 'action' => 'foo', 'fastcgi_server' => 'localhost', 'fastcgi_socket' => '/tmp/fastcgi.socket', diff --git a/templates/vhost/_wsgi.erb b/templates/vhost/_wsgi.erb index 473b223ab..a0d4ded65 100644 --- a/templates/vhost/_wsgi.erb +++ b/templates/vhost/_wsgi.erb @@ -22,3 +22,6 @@ <% if @wsgi_pass_authorization -%> WSGIPassAuthorization <%= @wsgi_pass_authorization %> <% end -%> +<% if @wsgi_chunked_request -%> + WSGIChunkedRequest <%= @wsgi_chunked_request %> +<% end -%>