11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
-
+
-
-
+
+
-
+
|
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#include "config.h"
#import "OFHTTPURLHandler.h"
#import "OFHTTPURIHandler.h"
#import "OFHTTPClient.h"
#import "OFHTTPRequest.h"
#import "OFHTTPResponse.h"
@implementation OFHTTPURLHandler
- (OFStream *)openItemAtURL: (OFURL *)URL mode: (OFString *)mode
@implementation OFHTTPURIHandler
- (OFStream *)openItemAtURI: (OFURI *)URI mode: (OFString *)mode
{
void *pool = objc_autoreleasePoolPush();
OFHTTPClient *client = [OFHTTPClient client];
OFHTTPRequest *request = [OFHTTPRequest requestWithURL: URL];
OFHTTPRequest *request = [OFHTTPRequest requestWithURI: URI];
OFHTTPResponse *response = [client performRequest: request];
[response retain];
objc_autoreleasePoolPop(pool);
return [response autorelease];
|