|
wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
|
Infer an HTTP Content-Type from a static file's path, by its extension (the substring after the last '. More...
Go to the source code of this file.
Functions | |
| const char * | wired_mimetype_for_path (const char *path) |
| Return the Content-Type for path's extension, or "application/octet-
stream" when the extension is absent or unrecognized. | |
Infer an HTTP Content-Type from a static file's path, by its extension (the substring after the last '.
' in the final path segment).
| const char * wired_mimetype_for_path | ( | const char * | path | ) |
Return the Content-Type for path's extension, or "application/octet- stream" when the extension is absent or unrecognized.
The returned string is a static constant; the caller must not free it.
| path | NUL-terminated file path (request path or resolved file path) |