Overview
Comment: | Rename of_http_* |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | new-naming-convention |
Files: | files | file ages | folders |
SHA3-256: |
83d8f3e5f6673abd73cfadee2de836c1 |
User & Date: | js on 2021-04-17 14:33:49 |
Other Links: | branch diff | manifest | tags |
Context
2021-04-17
| ||
14:36 | of_file_handle_t -> OFFileHandle check-in: 94ebfb3671 user: js tags: new-naming-convention | |
14:33 | Rename of_http_* check-in: 83d8f3e5f6 user: js tags: new-naming-convention | |
14:24 | of_plugin_handle_t -> OFPluginHandle check-in: cedc0cb75e user: js tags: new-naming-convention | |
Changes
Modified src/OFHTTPClient.m from [91e757df2d] to [7a0dc4013e].
︙ | |||
112 113 114 115 116 117 118 | 112 113 114 115 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 | - + - + | redirects: (unsigned int)redirects; @end static OFString * constructRequestString(OFHTTPRequest *request) { void *pool = objc_autoreleasePoolPush(); |
︙ | |||
231 232 233 234 235 236 237 | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | - + - - + + | firstLetter = false; str++; } } static bool |
︙ | |||
328 329 330 331 332 333 334 | 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | - + | if (keepAlive) { response.of_keepAlive = true; _client->_socket = [sock retain]; _client->_lastURL = [URL copy]; _client->_lastWasHEAD = |
︙ | |||
397 398 399 400 401 402 403 | 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 | - + | (object = [objectEnumerator nextObject]) != nil) if ([key hasPrefix: @"Content-"] || [key hasPrefix: @"Transfer-"]) [newHeaders removeObjectForKey: key]; |
︙ |
Modified src/OFHTTPRequest.h from [9c2534e693] to [c2fc6a197c].
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | - + - + - + - + - + - + - + - + - - + + - - + - + - + - - - + + - + - + | @class OFString; /** @file */ /** * @brief The type of an HTTP request. */ |
︙ | |||
142 143 144 145 146 147 148 | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | - - + + - - + | #endif /** * @brief Returns a C string describing the specified request method. * * @param method The request method which should be described as a C string * @return A C string describing the specified request method */ |
Modified src/OFHTTPRequest.m from [46acd12d86] to [ef85fc1d98].
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 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 73 74 75 76 77 78 79 80 81 82 | - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + | #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" #import "OFUnsupportedVersionException.h" const char * |
︙ | |||
90 91 92 93 94 95 96 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | - + | return [[[self alloc] initWithURL: URL] autorelease]; } - (instancetype)init { self = [super init]; |
︙ | |||
198 199 200 201 202 203 204 | 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | - + - + - + | OF_HASH_ADD_HASH(hash, OFSocketAddressHash(&_remoteAddress)); OF_HASH_FINALIZE(hash); return hash; } |
︙ | |||
248 249 250 251 252 253 254 | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | - + | _protocolVersion.major, _protocolVersion.minor]; } - (OFString *)description { void *pool = objc_autoreleasePoolPush(); |
︙ |
Modified src/OFHTTPResponse.h from [ab5c38416c] to [a9e1fde80c].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + - + | /** * @class OFHTTPResponse OFHTTPResponse.h ObjFW/OFHTTPResponse.h * * @brief A class for representing an HTTP request reply as a stream. */ @interface OFHTTPResponse: OFStream { |
︙ | |||
74 75 76 77 78 79 80 | 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + | #endif /** * @brief Returns a description string for the specified HTTP status code. * * @param code The HTTP status code to return a description string for * @return A description string for the specified HTTP status code */ |
Modified src/OFHTTPResponse.m from [94b8fa5885] to [a079a8cd2f].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + | #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" #import "OFTruncatedDataException.h" #import "OFUnsupportedVersionException.h" OFString * |
︙ | |||
245 246 247 248 249 250 251 | 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | - + - + - + | - (void)dealloc { [_headers release]; [super dealloc]; } |
︙ |
Modified src/OFHTTPServer.m from [c6a414493d] to [eb0e97662f].
︙ | |||
78 79 80 81 82 83 84 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + | OFTimer *_timer; enum { AWAITING_PROLOG, PARSING_HEADERS, SEND_RESPONSE } _state; uint8_t _HTTPMinorVersion; |
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - + | void *pool = objc_autoreleasePoolPush(); OFMutableDictionary OF_GENERIC(OFString *, OFString *) *headers; OFEnumerator *keyEnumerator, *valueEnumerator; OFString *key, *value; [_socket writeFormat: @"HTTP/%@ %hd %@\r\n", self.protocolVersionString, _statusCode, |
︙ | |||
371 372 373 374 375 376 377 | 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | - + | pos = [line rangeOfString: @" "].location; if (pos == OFNotFound) return [self sendErrorAndClose: 400]; method = [line substringToIndex: pos]; @try { |
︙ | |||
495 496 497 498 499 500 501 | 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 | - + - | { OFString *date = [[OFDate date] dateStringWithFormat: @"%a, %d %b %Y %H:%M:%S GMT"]; [_socket writeFormat: @"HTTP/1.1 %hd %@\r\n" @"Date: %@\r\n" @"Server: %@\r\n" @"\r\n", |
︙ | |||
546 547 548 549 550 551 552 | 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 | - + | URL.URLEncodedPath = _path; [URL makeImmutable]; request = [OFHTTPRequest requestWithURL: URL]; request.method = _method; request.protocolVersion = |
︙ |
Modified src/exceptions/OFHTTPRequestFailedException.m from [5d6244b48f] to [e96bd6a5f5].
︙ | |||
57 58 59 60 61 62 63 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - + | [_response release]; [super dealloc]; } - (OFString *)description { |
Modified utils/ofhttp/OFHTTP.m from [88b7d0694f] to [83d4f96412].
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - + | size_t _URLIndex; int _errorCode; OFString *_outputPath, *_currentFileName; bool _continue, _force, _detectFileName, _detectFileNameRequest; bool _detectedFileName, _quiet, _verbose, _insecure, _ignoreStatus; bool _useUnicode; OFStream *_body; |
︙ | |||
290 291 292 293 294 295 296 | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | - + | #endif - (instancetype)init { self = [super init]; @try { |
︙ | |||
366 367 368 369 370 371 372 | 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | - + | - (void)setMethod: (OFString *)method { void *pool = objc_autoreleasePoolPush(); method = method.uppercaseString; @try { |
︙ | |||
884 885 886 887 888 889 890 | 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 | - + - - + | if (_ignoreStatus) { exception = nil; goto after_exception_handling; } statusCode = response.statusCode; codeString = [OFString stringWithFormat: @"%hd %@", |
︙ | |||
1027 1028 1029 1030 1031 1032 1033 | 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 | - + | [of_stdout writeFormat: @"⠒ %@", URL.string]; else [of_stdout writeFormat: @"? %@", URL.string]; } request = [OFHTTPRequest requestWithURL: URL]; request.headers = clientHeaders; |
︙ |