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

View File

@ -95,8 +95,13 @@ NS_ASSUME_NONNULL_BEGIN
/**
* This method is the designated initializer for the class.
*
* If MIME type overrides are specified, they 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.
*/
- (nullable instancetype)initWithFile:(NSString*)path byteRange:(NSRange)range isAttachment:(BOOL)attachment;
- (nullable instancetype)initWithFile:(NSString*)path byteRange:(NSRange)range isAttachment:(BOOL)attachment mimeTypeOverrides:(nullable NSDictionary*)overrides;
@end