)]}'
{
  "commit": "ad5ef15e087983d1981a62d04f5fce6d9974f65c",
  "tree": "d00762c10b0cfc3d63fcdb810222db51ae0863dc",
  "parents": [
    "bfb42ad97c2ef1b04933b521f20540e7391e495e"
  ],
  "author": {
    "name": "Maxim Dounin",
    "email": "mdounin@mdounin.ru",
    "time": "Tue Sep 27 11:11:30 2011 +0000"
  },
  "committer": {
    "name": "Maxim Dounin",
    "email": "mdounin@mdounin.ru",
    "time": "Tue Sep 27 11:11:30 2011 +0000"
  },
  "message": "Fix for double content when return is used in error_page handler.\n\nTest case:\n\n   location / {\n       error_page 405 /nope;\n       return 405;\n   }\n\n   location /nope {\n       return 200;\n   }\n\nThis is expected to return 405 with empty body, but in 0.8.42+ will return\nbuiltin 405 error page as well (though not counted in Content-Length, thus\nbreaking protocol).\n\nFix is to use status provided by rewrite script execution in case\nit\u0027s less than NGX_HTTP_BAD_REQUEST even if r-\u003eerror_status set.  This\ncheck is in line with one in ngx_http_script_return_code().\n\nNote that this patch also changes behaviour for \"return 302 ...\" and\n\"rewrite ... redirect\" used as error handler.  E.g.\n\n    location / {\n        error_page 405 /redirect;\n        return 405;\n    }\n\n    location /redirect {\n        rewrite ^ http://example.com/;\n    }\n\nwill actually return redirect to \"http://example.com/\" instead of builtin 405\nerror page with meaningless Location header.  This looks like correct change\nand it\u0027s in line with what happens on e.g. directory redirects in error\nhandlers.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "44b5746ea7207ee9ee99858926f1c8c96031e0ba",
      "old_mode": 33188,
      "old_path": "src/http/modules/ngx_http_rewrite_module.c",
      "new_id": "5164734f27dee208c4b29267e6f8a22b0ec8d66b",
      "new_mode": 33188,
      "new_path": "src/http/modules/ngx_http_rewrite_module.c"
    }
  ]
}
