215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
[sock writeString: @"\r\n"];
/* Work around a bug in lighttpd, see above */
[sock flushWriteBuffer];
[sock setWriteBufferEnabled: NO];
if (requestType == OF_HTTP_REQUEST_TYPE_POST)
[sock writeBuffer: [POSTData cArray]
length: [POSTData count] * [POSTData itemSize]];
@try {
line = [sock readLine];
} @catch (OFInvalidEncodingException *e) {
@throw [OFInvalidServerReplyException
exceptionWithClass: [self class]];
|
|
|
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
[sock writeString: @"\r\n"];
/* Work around a bug in lighttpd, see above */
[sock flushWriteBuffer];
[sock setWriteBufferEnabled: NO];
if (requestType == OF_HTTP_REQUEST_TYPE_POST)
[sock writeBuffer: [POSTData items]
length: [POSTData count] * [POSTData itemSize]];
@try {
line = [sock readLine];
} @catch (OFInvalidEncodingException *e) {
@throw [OFInvalidServerReplyException
exceptionWithClass: [self class]];
|
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
|
length: length
request: request];
objc_autoreleasePoolPop(pool2);
pool2 = objc_autoreleasePoolPush();
bytesReceived += length;
[data addItemsFromCArray: buffer
count: length];
toRead -= length;
}
@try {
line = [sock readLine];
} @catch (OFInvalidEncodingException *e) {
|
|
|
|
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
|
length: length
request: request];
objc_autoreleasePoolPop(pool2);
pool2 = objc_autoreleasePoolPush();
bytesReceived += length;
[data addItems: buffer
count: length];
toRead -= length;
}
@try {
line = [sock readLine];
} @catch (OFInvalidEncodingException *e) {
|
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
|
didReceiveData: buffer
length: length
request: request];
objc_autoreleasePoolPop(pool2);
bytesReceived += length;
[data addItemsFromCArray: buffer
count: length];
if (contentLengthHeader != nil &&
bytesReceived >= contentLength)
break;
}
}
} @finally {
|
|
|
|
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
|
didReceiveData: buffer
length: length
request: request];
objc_autoreleasePoolPop(pool2);
bytesReceived += length;
[data addItems: buffer
count: length];
if (contentLengthHeader != nil &&
bytesReceived >= contentLength)
break;
}
}
} @finally {
|