mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-30 12:50:58 +00:00
Handle more mime types
This commit is contained in:
1 parent
fa8f62fb5d
commit
f176e1ae59
4 files changed
+126
-8
No files matched your search
Whitespace-only changes.
@@ -484,6 +484,16 @@ static void test_http_server(void) {
|
||||
free(data);
|
||||
}
|
||||
|
||||
{
|
||||
// Test mime type
|
||||
struct mg_http_message hm;
|
||||
ASSERT(fetch(&mgr, buf, url, "GET /empty.js HTTP/1.0\r\n\n") == 200);
|
||||
mg_http_parse(buf, strlen(buf), &hm);
|
||||
ASSERT(mg_http_get_header(&hm, "Content-Type") != NULL);
|
||||
ASSERT(mg_strcmp(*mg_http_get_header(&hm, "Content-Type"),
|
||||
mg_str("text/javascript")) == 0);
|
||||
}
|
||||
|
||||
{
|
||||
// Test connection refused
|
||||
int i, errored = 0;
|
||||
|
||||
Reference in new issue
Block a user