ObjFW  Diff

Differences From Artifact [27860baf5d]:

To Artifact [f1da42cb60]:


38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#import "OFTruncatedDataException.h"
#import "OFUnsupportedProtocolException.h"
#import "OFUnsupportedVersionException.h"

#import "autorelease.h"
#import "macros.h"

Class of_http_client_tls_socket_class = Nil;

static OF_INLINE void
normalize_key(char *str_)
{
	uint8_t *str = (uint8_t*)str_;
	BOOL firstLetter = YES;

	while (*str != '\0') {







<
<







38
39
40
41
42
43
44


45
46
47
48
49
50
51
#import "OFTruncatedDataException.h"
#import "OFUnsupportedProtocolException.h"
#import "OFUnsupportedVersionException.h"

#import "autorelease.h"
#import "macros.h"



static OF_INLINE void
normalize_key(char *str_)
{
	uint8_t *str = (uint8_t*)str_;
	BOOL firstLetter = YES;

	while (*str != '\0') {
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
		@throw [OFUnsupportedProtocolException
		    exceptionWithClass: [self class]
				   URL: URL];

	if ([scheme isEqual: @"http"])
		sock = [OFTCPSocket socket];
	else {
		if (of_http_client_tls_socket_class == Nil)
			@throw [OFUnsupportedProtocolException
			    exceptionWithClass: [self class]
					   URL: URL];

		sock = [[[of_http_client_tls_socket_class alloc] init]
		    autorelease];
	}

	[delegate client: self
	 didCreateSocket: sock
		 request: request];

	[sock connectToHost: [URL host]







|




|
<







140
141
142
143
144
145
146
147
148
149
150
151
152

153
154
155
156
157
158
159
		@throw [OFUnsupportedProtocolException
		    exceptionWithClass: [self class]
				   URL: URL];

	if ([scheme isEqual: @"http"])
		sock = [OFTCPSocket socket];
	else {
		if (of_tls_socket_class == Nil)
			@throw [OFUnsupportedProtocolException
			    exceptionWithClass: [self class]
					   URL: URL];

		sock = [[[of_tls_socket_class alloc] init] autorelease];

	}

	[delegate client: self
	 didCreateSocket: sock
		 request: request];

	[sock connectToHost: [URL host]