Differences From Artifact [4bc226ed65]:
- File utils/ofhttp/OFHTTP.m — part of check-in [e0b9167693] at 2016-02-21 15:37:42 on branch trunk — Make use of C99-style for loops (user: js, size: 20109) [annotate] [blame] [check-ins using]
To Artifact [e8263f7476]:
- File
utils/ofhttp/OFHTTP.m
— part of check-in
[a509ab7e91]
at
2016-08-21 14:09:57
on branch trunk
— OFHTTPClient: Add response to redirect delegate
This allows ofhttp to display all headers for the redirect in verbose
mode (the change for this is included). (user: js, size: 20701) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
322 323 324 325 326 327 328 329 330 | afterDelay: 0]; } - (bool)client: (OFHTTPClient*)client shouldFollowRedirect: (OFURL*)URL statusCode: (int)statusCode request: (OFHTTPRequest*)request { if (!_quiet) | > | > > > > > > > > > > > > > > > > > > > | | 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | afterDelay: 0]; } - (bool)client: (OFHTTPClient*)client shouldFollowRedirect: (OFURL*)URL statusCode: (int)statusCode request: (OFHTTPRequest*)request response: (OFHTTPResponse*)response { if (!_quiet) [of_stdout writeFormat: @" ➜ %d\n", statusCode]; if (_verbose) { void *pool = objc_autoreleasePoolPush(); OFDictionary OF_GENERIC(OFString*, OFString*) *headers = [response headers]; OFEnumerator *keyEnumerator = [headers keyEnumerator]; OFEnumerator *objectEnumerator = [headers objectEnumerator]; OFString *key, *object; while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) [of_stdout writeFormat: @" %@: %@\n", key, object]; objc_autoreleasePoolPop(pool); } if (!_quiet) [of_stdout writeFormat: @"☇ %@", [URL string]]; return true; } - (OFHTTPResponse*)performRequest: (OFHTTPRequest*)request { OFHTTPResponse *response = nil; |
︙ | ︙ |