diff --git a/dist/antd-1.0.4b.tar.gz b/dist/antd-1.0.4b.tar.gz index ad2c32b..e5d039e 100644 Binary files a/dist/antd-1.0.4b.tar.gz and b/dist/antd-1.0.4b.tar.gz differ diff --git a/http_server.c b/http_server.c index e87fee5..0238815 100644 --- a/http_server.c +++ b/http_server.c @@ -483,10 +483,10 @@ void *serve_file(void *data) char *path = (char *)dvalue(rq->request, "ABS_RESOURCE_PATH"); char *mime_type = (char *)dvalue(rq->request, "RESOURCE_MIME"); ctype(rq->client, mime_type); - if (is_bin(path)) + /*if (is_bin(path)) __fb(rq->client, path); - else - __f(rq->client, path); + else*/ + __f(rq->client, path); return task; } diff --git a/lib/handle.c b/lib/handle.c index 3ba8624..a9a9778 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -477,7 +477,7 @@ int __b(void* client, const unsigned char* data, int size) } return 1; } -int __fb(void* client, const char* file) +int __f(void* client, const char* file) { printf("Open file %s\n",file ); unsigned char buffer[BUFFLEN]; @@ -497,6 +497,7 @@ int __fb(void* client, const char* file) fclose(ptr); return 1; } +/* int __f(void* client, const char* file) { char buf[BUFFLEN]; @@ -520,7 +521,7 @@ int __f(void* client, const char* file) fclose(ptr); return 1; } - +*/ int upload(const char* tmp, const char* path) { return !rename(tmp, path); diff --git a/lib/handle.h b/lib/handle.h index d14d103..f491a37 100644 --- a/lib/handle.h +++ b/lib/handle.h @@ -95,7 +95,7 @@ int __ti(void*,int); int __t(void*, const char*,...); int __b(void*, const unsigned char*, int); int __f(void*, const char*); -int __fb(void*, const char*); +//int __fb(void*, const char*); int upload(const char*, const char*); void set_cookie(void*, const char*,dictionary,const char*);