516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
|
[_client->_delegate client: _client
didEncounterException: e
forRequest: _request];
return false;
}
}
- (bool)socket: (OFTCPSocket *)socket
didWriteRequest: (const void *)request
length: (size_t)length
context: (id)context
exception: (id)exception
{
OFData *body;
if (exception != nil) {
|
|
|
|
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
|
[_client->_delegate client: _client
didEncounterException: e
forRequest: _request];
return false;
}
}
- (size_t)socket: (OFTCPSocket *)socket
didWriteRequest: (const void **)request
length: (size_t)length
context: (id)context
exception: (id)exception
{
OFData *body;
if (exception != nil) {
|
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
|
if ((body = [_request body]) != nil) {
[socket asyncWriteBuffer: [body items]
length: [body count] * [body itemSize]
target: self
selector: @selector(socket:didWriteBody:length:
context:exception:)
context: nil];
return false;
} else
return [self socket: socket
didWriteBody: NULL
length: 0
context: nil
exception: nil];
}
- (bool)socket: (OFTCPSocket *)socket
didWriteBody: (const void *)body
length: (size_t)length
context: (id)context
exception: (id)exception
{
[socket asyncReadLineWithTarget: self
selector: @selector(socket:didReadLine:context:
exception:)
context: nil];
return false;
}
- (void)handleSocket: (OFTCPSocket *)socket
{
/*
* As a work around for a bug with split packets in lighttpd when using
* HTTPS, we construct the complete request in a buffer string and then
|
|
|
|
|
|
|
|
|
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
|
if ((body = [_request body]) != nil) {
[socket asyncWriteBuffer: [body items]
length: [body count] * [body itemSize]
target: self
selector: @selector(socket:didWriteBody:length:
context:exception:)
context: nil];
return 0;
} else
return [self socket: socket
didWriteBody: NULL
length: 0
context: nil
exception: nil];
}
- (size_t)socket: (OFTCPSocket *)socket
didWriteBody: (const void **)body
length: (size_t)length
context: (id)context
exception: (id)exception
{
[socket asyncReadLineWithTarget: self
selector: @selector(socket:didReadLine:context:
exception:)
context: nil];
return 0;
}
- (void)handleSocket: (OFTCPSocket *)socket
{
/*
* As a work around for a bug with split packets in lighttpd when using
* HTTPS, we construct the complete request in a buffer string and then
|