Differences From Artifact [ffcaf67e5f]:
- File src/OFHTTPRequest.h — part of check-in [50b5ac3b27] at 2013-01-17 23:15:33 on branch trunk — Documentation improvements. (user: js, size: 3825) [annotate] [blame] [check-ins using]
To Artifact [eeab32f289]:
- File
src/OFHTTPRequest.h
— part of check-in
[bdf9c4d96b]
at
2013-01-26 00:13:56
on branch trunk
— Make OFHTTPRequestReply a stream.
This also implements chunked transfer encoding for OFHTTPServer and adds
a property for the protocol version to OFHTTPRequest(Reply).Additionally, this makes it possible to add an async version of
OFHTTPClient. (user: js, size: 5008) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | OF_HTTP_REQUEST_TYPE_GET, /*! POST */ OF_HTTP_REQUEST_TYPE_POST, /*! HEAD */ OF_HTTP_REQUEST_TYPE_HEAD } of_http_request_type_t; /*! * @brief A class for storing HTTP requests. */ @interface OFHTTPRequest: OFObject { OFURL *URL; of_http_request_type_t requestType; OFDictionary *headers; OFDataArray *POSTData; OFString *MIMEType; OFString *remoteAddress; } #ifdef OF_HAVE_PROPERTIES @property (copy) OFURL *URL; @property of_http_request_type_t requestType; @property (copy) OFDictionary *headers; @property (retain) OFDataArray *POSTData; @property (copy) OFString *MIMEType; @property (copy) OFString *remoteAddress; #endif /*! | > > > > > > > > > > > > | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | OF_HTTP_REQUEST_TYPE_GET, /*! POST */ OF_HTTP_REQUEST_TYPE_POST, /*! HEAD */ OF_HTTP_REQUEST_TYPE_HEAD } of_http_request_type_t; /*! * @brief The HTTP version of the HTTP request. */ typedef struct of_http_request_protocol_version_t { /*! The major of the HTTP version */ uint8_t major; /*! The minor of the HTTP version */ uint8_t minor; } of_http_request_protocol_version_t; /*! * @brief A class for storing HTTP requests. */ @interface OFHTTPRequest: OFObject { OFURL *URL; of_http_request_type_t requestType; of_http_request_protocol_version_t protocolVersion; OFDictionary *headers; OFDataArray *POSTData; OFString *MIMEType; OFString *remoteAddress; } #ifdef OF_HAVE_PROPERTIES @property (copy) OFURL *URL; @property of_http_request_type_t requestType; @property of_http_request_protocol_version_t protocolVersion; @property (copy) OFDictionary *headers; @property (retain) OFDataArray *POSTData; @property (copy) OFString *MIMEType; @property (copy) OFString *remoteAddress; #endif /*! |
︙ | ︙ | |||
104 105 106 107 108 109 110 111 112 113 114 115 116 117 | /*! * @brief Returns the request type of the HTTP request. * * @return The request type of the HTTP request */ - (of_http_request_type_t)requestType; /*! * @brief Sets a dictionary with headers for the HTTP request. * * @param headers A dictionary with headers for the HTTP request */ - (void)setHeaders: (OFDictionary*)headers; | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | /*! * @brief Returns the request type of the HTTP request. * * @return The request type of the HTTP request */ - (of_http_request_type_t)requestType; /*! * @brief Sets the protocol version of the HTTP request. * * @param protocolVersion The protocol version of the HTTP request */ - (void)setProtocolVersion: (of_http_request_protocol_version_t)protocolVersion; /*! * @brief Returns the protocol version of the HTTP request. * * @return The protocol version of the HTTP request */ - (of_http_request_protocol_version_t)protocolVersion; /*! * @brief Sets the protocol version of the HTTP request to the version * described by the specified string. * * @param string A string describing an HTTP version */ - (void)setProtocolVersionFromString: (OFString*)string; /*! * @brief Returns the protocol version of the HTTP request as a string. * * @return The protocol version of the HTTP request as a string */ - (OFString*)protocolVersionString; /*! * @brief Sets a dictionary with headers for the HTTP request. * * @param headers A dictionary with headers for the HTTP request */ - (void)setHeaders: (OFDictionary*)headers; |
︙ | ︙ |