diff --git a/ext/iodine/http.c b/ext/iodine/http.c index abbee0b..3711502 100644 --- a/ext/iodine/http.c +++ b/ext/iodine/http.c @@ -564,6 +564,8 @@ int http_sendfile2(http_s *h, const char *prefix, size_t prefix_len, http_set_header(h, HTTP_HEADER_CONTENT_LENGTH, fiobj_num_new(length)); http_finish(h); return 0; + } else if (!strncasecmp("post", s.data, 4)) { + goto open_file; } break; } diff --git a/ext/iodine/http_internal.c b/ext/iodine/http_internal.c index fc56c48..5fab78e 100644 --- a/ext/iodine/http_internal.c +++ b/ext/iodine/http_internal.c @@ -42,7 +42,8 @@ void http_on_request_handler______internal(http_s *h, fiobj_hash_get2(h->headers, fiobj_obj2hash(HTTP_HEADER_ACCEPT)), HTTP_HVALUE_SSE_MIME)) goto eventsource; - if (settings->public_folder) { + if (settings->public_folder && + (fiobj_obj2cstr(h->method).len != 4 || strncasecmp("post", fiobj_obj2cstr(h->method).data, 4))) { fio_str_info_s path_str = fiobj_obj2cstr(h->path); if (!http_sendfile2(h, settings->public_folder, settings->public_folder_length, path_str.data,