nginx-0.0.1-2003-04-11-20:01:14 import
diff --git a/src/http/modules/ngx_http_static_handler.c b/src/http/modules/ngx_http_static_handler.c
index c8a0141..480e641 100644
--- a/src/http/modules/ngx_http_static_handler.c
+++ b/src/http/modules/ngx_http_static_handler.c
@@ -40,14 +40,15 @@
                       "ngx_http_static_handler: "
                       ngx_open_file_n " %s failed", r->file.name.data);
 
-        if (err == NGX_ENOENT)
+        if (err == NGX_ENOENT) {
             return NGX_HTTP_NOT_FOUND;
-#if (WIN32)
-        else if (err == ERROR_PATH_NOT_FOUND)
+
+        } else if (err == NGX_ENOTDIR) {
             return NGX_HTTP_NOT_FOUND;
-#endif
-        else
+
+        } else {
             return NGX_HTTP_INTERNAL_SERVER_ERROR;
+        }
     }
 
     if (!r->file.info_valid) {