nginx-0.0.1-2003-10-10-19:10:50 import
diff --git a/src/http/modules/ngx_http_static_handler.c b/src/http/modules/ngx_http_static_handler.c
index 784f3de..b8aa8d4 100644
--- a/src/http/modules/ngx_http_static_handler.c
+++ b/src/http/modules/ngx_http_static_handler.c
@@ -127,33 +127,12 @@
 
 
     rc = ngx_http_send_header(r);
-    if (rc == NGX_ERROR || rc > NGX_OK) {
-        ngx_http_finalize_request(r, rc);
-        return NGX_OK;
+
+    if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) {
+        return rc;
     }
 
-    if (r->header_only) {
-        ngx_http_finalize_request(r, rc);
-
-#if 0
-        if (rc == NGX_AGAIN) {
-            ngx_http_set_write_handler(r);
-
-        } else {
-            ngx_http_finalize_request(r, 0);
-        }
-#endif
-
-        return NGX_OK;
-    }
-
-
-#if 0
     h->type = r->main ? NGX_HUNK_FILE : NGX_HUNK_FILE|NGX_HUNK_LAST;
-#else
-    h->type = NGX_HUNK_FILE;
-#endif
-
 
     h->file_pos = 0;
     h->file_last = ngx_file_size(r->file.info);
@@ -161,20 +140,5 @@
     h->file->fd = r->file.fd;
     h->file->log = r->connection->log;
 
-    rc = ngx_http_output_filter(r, h);
-
-    ngx_http_finalize_request(r, rc);
-
-#if 0
-    if (r->main == NULL) {
-        if (rc == NGX_AGAIN) {
-            ngx_http_set_write_handler(r);
-
-        } else {
-            ngx_http_finalize_request(r, 0);
-        }
-    }
-#endif
-
-    return NGX_OK;
+    return ngx_http_output_filter(r, h);
 }
diff --git a/src/http/modules/proxy/ngx_http_proxy_handler.c b/src/http/modules/proxy/ngx_http_proxy_handler.c
index 8be3aa3..adb9be5 100644
--- a/src/http/modules/proxy/ngx_http_proxy_handler.c
+++ b/src/http/modules/proxy/ngx_http_proxy_handler.c
@@ -1108,7 +1108,9 @@
     ctx = (ngx_http_conf_ctx_t *) cycle->conf_ctx[ngx_http_module.index];
     cmcf = ctx->main_conf[ngx_http_core_module.ctx_index];
 
-    ngx_test_null(h, ngx_push_array(&cmcf->translate_handlers), NGX_ERROR);
+    ngx_test_null(h, ngx_push_array(
+                             &cmcf->phases[NGX_HTTP_TRANSLATE_PHASE].handlers),
+                  NGX_ERROR);
 
     *h = ngx_http_proxy_translate_handler;