From 143ca5b99f86b7316c79c851f5eceb076b8daf1d Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Latour Date: Sun, 20 Apr 2014 10:34:45 -0300 Subject: [PATCH] Fix --- .../Responses/GCDWebServerDataResponse.h | 3 ++- .../Responses/GCDWebServerErrorResponse.h | 8 +++--- .../Responses/GCDWebServerFileResponse.h | 26 +++++++++---------- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/GCDWebServer/Responses/GCDWebServerDataResponse.h b/GCDWebServer/Responses/GCDWebServerDataResponse.h index eb9cfca..b0c6493 100644 --- a/GCDWebServer/Responses/GCDWebServerDataResponse.h +++ b/GCDWebServer/Responses/GCDWebServerDataResponse.h @@ -78,7 +78,7 @@ /** * Initializes a data response from text encoded using UTF-8. */ -- (instancetype)initWithText:(NSString*)text; // Encodes using UTF-8 +- (instancetype)initWithText:(NSString*)text; /** * Initializes a data response from HTML encoded using UTF-8. @@ -87,6 +87,7 @@ /** * Initializes a data response from an HTML template encoded using UTF-8. + * * All occurences of "%variable%" within the HTML template are replaced with * their corresponding values. */ diff --git a/GCDWebServer/Responses/GCDWebServerErrorResponse.h b/GCDWebServer/Responses/GCDWebServerErrorResponse.h index 5d15e8b..381b122 100644 --- a/GCDWebServer/Responses/GCDWebServerErrorResponse.h +++ b/GCDWebServer/Responses/GCDWebServerErrorResponse.h @@ -46,13 +46,13 @@ /** * Creates a client error response with the corresponding HTTP status code - * and an optional underlying NSError. + * and an underlying NSError. */ + (instancetype)responseWithClientError:(GCDWebServerClientErrorHTTPStatusCode)errorCode underlyingError:(NSError*)underlyingError message:(NSString*)format, ... NS_FORMAT_FUNCTION(3,4); /** * Creates a server error response with the corresponding HTTP status code - * and an optional underlying NSError. + * and an underlying NSError. */ + (instancetype)responseWithServerError:(GCDWebServerServerErrorHTTPStatusCode)errorCode underlyingError:(NSError*)underlyingError message:(NSString*)format, ... NS_FORMAT_FUNCTION(3,4); @@ -68,13 +68,13 @@ /** * Initializes a client error response with the corresponding HTTP status code - * and an optional underlying NSError. + * and an underlying NSError. */ - (instancetype)initWithClientError:(GCDWebServerClientErrorHTTPStatusCode)errorCode underlyingError:(NSError*)underlyingError message:(NSString*)format, ... NS_FORMAT_FUNCTION(3,4); /** * Initializes a server error response with the corresponding HTTP status code - * and an optional underlying NSError. + * and an underlying NSError. */ - (instancetype)initWithServerError:(GCDWebServerServerErrorHTTPStatusCode)errorCode underlyingError:(NSError*)underlyingError message:(NSString*)format, ... NS_FORMAT_FUNCTION(3,4); diff --git a/GCDWebServer/Responses/GCDWebServerFileResponse.h b/GCDWebServer/Responses/GCDWebServerFileResponse.h index 391a787..648f4b9 100644 --- a/GCDWebServer/Responses/GCDWebServerFileResponse.h +++ b/GCDWebServer/Responses/GCDWebServerFileResponse.h @@ -31,20 +31,20 @@ * The GCDWebServerFileResponse subclass of GCDWebServerResponse reads the body * of the HTTP response from a file on disk. * - * It will automatically set the lastModifiedDate and eTag properties of the - * GCDWebServerResponse according to the file metadata. + * It will automatically set the contentType, lastModifiedDate and eTag + * properties of the GCDWebServerResponse according to the file extension and + * metadata. */ @interface GCDWebServerFileResponse : GCDWebServerResponse /** - * Creates a response with the contents of a file and the content type - * automatically set from the file extension. + * Creates a response with the contents of a file. */ + (instancetype)responseWithFile:(NSString*)path; /** - * Creates a response like +responseWithFile: but sets the "Content-Disposition" - * HTTP header appropriately for a download if the "attachment" argument is YES. + * Creates a response like +responseWithFile: and sets the "Content-Disposition" + * HTTP header for a download if the "attachment" argument is YES. */ + (instancetype)responseWithFile:(NSString*)path isAttachment:(BOOL)attachment; @@ -57,21 +57,21 @@ + (instancetype)responseWithFile:(NSString*)path byteRange:(NSRange)range; /** - * Creates a response like +responseWithFile:byteRange: but also sets the - * "Content-Disposition" HTTP header appropriately for a download if the - * "attachment" argument is YES. + * Creates a response like +responseWithFile:byteRange: and sets the + * "Content-Disposition" HTTP header for a download if the "attachment" + * argument is YES. */ + (instancetype)responseWithFile:(NSString*)path byteRange:(NSRange)range isAttachment:(BOOL)attachment; /** - * Initializes a response with the contents of a file and the content type - * automatically set from the file extension. + * Initializes a response with the contents of a file. */ - (instancetype)initWithFile:(NSString*)path; /** - * Initializes a response like -initWithFile: but sets the "Content-Disposition" - * HTTP header appropriately for a download if the "attachment" argument is YES. + * Initializes a response like +responseWithFile: and sets the + * "Content-Disposition" HTTP header for a download if the "attachment" + * argument is YES. */ - (instancetype)initWithFile:(NSString*)path isAttachment:(BOOL)attachment;