Cleaned up HTTP code a little.
parent
acf8f8f3be
commit
5d91bda8fe
|
@ -25,10 +25,13 @@
|
|||
_get->addheader("Accept:*/*");
|
||||
|
||||
_get->connect([[url absoluteString] UTF8String]);
|
||||
for(;;)
|
||||
{
|
||||
for(;;) {
|
||||
int status = _get->get_status();
|
||||
if (status < 0 || status > 1) break;
|
||||
|
||||
if (status < 0 || status > 1) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (_get->run() < 0) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -40,8 +43,6 @@
|
|||
return NO;
|
||||
}
|
||||
|
||||
// length = _get.content_length();
|
||||
|
||||
const char *mimeType = _get->getheader("content-type");
|
||||
if (NULL != mimeType) {
|
||||
_mimeType = [[NSString alloc] initWithUTF8String:mimeType];
|
||||
|
|
Loading…
Reference in New Issue