Skip to content

Commit

Permalink
Add test for #210 report
Browse files Browse the repository at this point in the history
  • Loading branch information
MATSUMOTO Ryosuke committed Sep 28, 2016
1 parent adffb4b commit 077b918
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,10 @@ http {
location /nginx_false_true {
mruby_content_handler_code 'Nginx.rputs (Nginx::FALSE + Nginx::TRUE)';
}
location /issue_210 {
mruby_post_read_handler_code 'Nginx::Request.new.headers_out["hoge"] = "fuga"';
mruby_content_handler_code 'Nginx.rputs "hello"';
}
}

server {
Expand Down
7 changes: 7 additions & 0 deletions test/t/ngx_mruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@ def base_ssl(port)
t.assert_equal "false", res["body"]
end

t.assert('ngx_mruby - bug; mruby_post_read_handler not running in 1.18.3+', 'location /issue_210') do
res = HttpRequest.new.get base + '/issue_210'
t.assert_equal "fuga", res["hoge"]
t.assert_equal "hello", res["body"]
end


p nginx_version

if nginx_version.split(".")[1].to_i > 6
Expand Down

0 comments on commit 077b918

Please sign in to comment.