Skip to content

Commit

Permalink
Merge pull request #890 from retr0h/feature/MODULES-1423
Browse files Browse the repository at this point in the history
(#1423) Added the WSGIChunkedRequest directive to vhost
  • Loading branch information
igalic committed Oct 17, 2014
2 parents e269a47 + e5d5f64 commit 6300be8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 sets 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
Expand All @@ -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',
}
```

Expand Down
1 change: 1 addition & 0 deletions manifests/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 5 additions & 2 deletions spec/acceptance/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions spec/defines/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@
'user' => 'someuser',
'group' => 'somegroup'
},
'wsgi_chunked_request' => 'On',
'action' => 'foo',
'fastcgi_server' => 'localhost',
'fastcgi_socket' => '/tmp/fastcgi.socket',
Expand Down
3 changes: 3 additions & 0 deletions templates/vhost/_wsgi.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@
<% if @wsgi_pass_authorization -%>
WSGIPassAuthorization <%= @wsgi_pass_authorization %>
<% end -%>
<% if @wsgi_chunked_request -%>
WSGIChunkedRequest <%= @wsgi_chunked_request %>
<% end -%>

0 comments on commit 6300be8

Please sign in to comment.