75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
@"Usage: %@ -[cehHmoPq] url1 [url2 ...]\n",
[OFApplication programName]];
if (full)
[stream writeString:
@"\nOptions:\n"
@" -c Continue download of existing file\n"
@" -e Specify the entity\n"
@" -h Show this help\n"
@" -H Add a header (e.g. X-Foo:Bar)\n"
@" -m Set the method of the HTTP request\n"
@" -o Output filename\n"
@" -P Specify SOCKS5 proxy\n"
@" -q Quiet mode (no output, except errors)\n"];
|
|
|
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
@"Usage: %@ -[cehHmoPq] url1 [url2 ...]\n",
[OFApplication programName]];
if (full)
[stream writeString:
@"\nOptions:\n"
@" -c Continue download of existing file\n"
@" -e Specify the file to send as entity\n"
@" -h Show this help\n"
@" -H Add a header (e.g. X-Foo:Bar)\n"
@" -m Set the method of the HTTP request\n"
@" -o Output filename\n"
@" -P Specify SOCKS5 proxy\n"
@" -q Quiet mode (no output, except errors)\n"];
|
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
|
- (bool)stream: (OFHTTPResponse*)response
didReadIntoBuffer: (void*)buffer
length: (size_t)length
exception: (OFException*)e
{
if (e != nil) {
OFURL *URL;
[_progressBar stop];
[_progressBar draw];
[_progressBar release];
_progressBar = nil;
if (!_quiet)
[of_stdout writeString: @"\n Error!\n"];
URL = [_URLs objectAtIndex: _URLIndex - 1];
[of_stderr writeFormat: @"%@: Failed to download <%@>: %@\n",
[OFApplication programName],
[URL string], e];
_errorCode = 1;
goto next;
}
_received += length;
|
|
|
<
|
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
- (bool)stream: (OFHTTPResponse*)response
didReadIntoBuffer: (void*)buffer
length: (size_t)length
exception: (OFException*)e
{
if (e != nil) {
OFString *URL;
[_progressBar stop];
[_progressBar draw];
[_progressBar release];
_progressBar = nil;
if (!_quiet)
[of_stdout writeString: @"\n Error!\n"];
URL = [_URLs objectAtIndex: _URLIndex - 1];
[of_stderr writeFormat: @"%@: Failed to download <%@>: %@\n",
[OFApplication programName], URL, e];
_errorCode = 1;
goto next;
}
_received += length;
|