mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-31 13:00:49 +00:00
Remove mg_stat
This commit is contained in:
1 parent
7e1d4325ec
commit
d6dbf831f7
8 files changed
+63
-53
No files matched your search
+3
-3
@@ -473,7 +473,6 @@ static void test_http_server(void) {
|
||||
struct mg_mgr mgr;
|
||||
const char *url = "http://127.0.0.1:12346";
|
||||
char buf[FETCH_BUF_SIZE];
|
||||
mg_stat_t st;
|
||||
|
||||
mg_mgr_init(&mgr);
|
||||
mg_http_listen(&mgr, url, eh1, NULL);
|
||||
@@ -493,9 +492,10 @@ static void test_http_server(void) {
|
||||
ASSERT(cmpbody(buf, "є\n") == 0);
|
||||
|
||||
{
|
||||
extern char *mg_http_etag(char *, size_t, mg_stat_t *);
|
||||
extern char *mg_http_etag(char *, size_t, struct stat *);
|
||||
struct stat st;
|
||||
char etag[100];
|
||||
ASSERT(mg_stat("./test/data/a.txt", &st) == 0);
|
||||
ASSERT(stat("./test/data/a.txt", &st) == 0);
|
||||
ASSERT(mg_http_etag(etag, sizeof(etag), &st) == etag);
|
||||
ASSERT(fetch(&mgr, buf, url, "GET /a.txt HTTP/1.0\nIf-None-Match: %s\n\n",
|
||||
etag) == 304);
|
||||
|
||||
Reference in new issue
Block a user