Allow to customiz mime types used by GCDWebServerFileResponse

This commit is contained in:
Pierre-Olivier Latour
2017-06-24 09:54:09 -07:00
parent a013f9cebb
commit c35d514b08
4 changed files with 22 additions and 10 deletions
+5 -1
View File
@@ -36,8 +36,12 @@ extern "C" {
/**
* Converts a file extension to the corresponding MIME type.
* If there is no match, "application/octet-stream" is returned.
*
* Overrides allow to customize the built-in mapping from extensions to MIME
* types. Keys of the dictionary must be lowercased file extensions without
* the period, and the values must be the corresponding MIME types.
*/
NSString* GCDWebServerGetMimeTypeForExtension(NSString* extension);
NSString* GCDWebServerGetMimeTypeForExtension(NSString* extension, NSDictionary* _Nullable overrides);
/**
* Add percent-escapes to a string so it can be used in a URL.