Permalink
Browse files

git-svn-id: svn://cherokee-project.com/cherokee/trunk@1658 5dc97367-9…

…7f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent b35a69a commit 16f53b0751a512523e28002e9ad7320a0f5c9b43 @alobbs alobbs committed Jul 17, 2008
Showing with 15 additions and 3 deletions.
  1. +8 −2 cherokee/handler_fcgi.c
  2. +7 −1 cherokee/handler_scgi.c
@@ -729,9 +729,15 @@ cherokee_handler_fcgi_init (cherokee_handler_fcgi_t *hdl)
/* Connect
*/
ret = connect_to_server (hdl);
- if (unlikely (ret != ret_ok)) {
+ switch (ret) {
+ case ret_ok:
+ break;
+ case ret_deny:
+ conn->error_code = http_gateway_timeout;
+ return ret_error;
+ default:
conn->error_code = http_service_unavailable;
- return ret_error;
+ return ret_error;
}
HDL_CGI_BASE(hdl)->init_phase = hcgi_phase_send_headers;
@@ -380,7 +380,13 @@ cherokee_handler_scgi_init (cherokee_handler_scgi_t *hdl)
/* Connect
*/
ret = connect_to_server (hdl);
- if (unlikely (ret != ret_ok)) {
+ switch (ret) {
+ case ret_ok:
+ break;
+ case ret_deny:
+ conn->error_code = http_gateway_timeout;
+ return ret_error;
+ default:
conn->error_code = http_service_unavailable;
return ret_error;
}

0 comments on commit 16f53b0

Please sign in to comment.