This commit is contained in:
lxsang 2019-11-30 19:40:40 +00:00
parent f48321e1a1
commit 5d795ce4c3
4 changed files with 7 additions and 6 deletions

Binary file not shown.

View File

@ -483,9 +483,9 @@ 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
else*/
__f(rq->client, path);
return task;
}

View File

@ -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);

View File

@ -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*);