12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
* 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"
#define OF_HTTP_REQUEST_M
#include <string.h>
#include <ctype.h>
#import "OFHTTPClient.h"
#import "OFHTTPRequest.h"
#import "OFString.h"
|
|
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
* 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"
#define OF_HTTP_CLIENT_M
#include <string.h>
#include <ctype.h>
#import "OFHTTPClient.h"
#import "OFHTTPRequest.h"
#import "OFString.h"
|
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#import "autorelease.h"
#import "macros.h"
Class of_http_client_tls_socket_class = Nil;
static OF_INLINE void
normalize_key(char *str)
{
BOOL firstLetter = YES;
while (*str != '\0') {
if (!isalnum(*str)) {
firstLetter = YES;
str++;
continue;
|
|
>
|
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#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') {
if (!isalnum(*str)) {
firstLetter = YES;
str++;
continue;
|
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
normalize_key(keyC);
@try {
key = [OFString stringWithUTF8StringNoCopy: keyC
freeWhenDone: YES];
} @catch (id e) {
free(keyC);
}
do {
tmp++;
} while (*tmp == ' ');
value = [OFString stringWithUTF8String: tmp];
|
>
|
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
normalize_key(keyC);
@try {
key = [OFString stringWithUTF8StringNoCopy: keyC
freeWhenDone: YES];
} @catch (id e) {
free(keyC);
@throw e;
}
do {
tmp++;
} while (*tmp == ' ');
value = [OFString stringWithUTF8String: tmp];
|