Overview
Context
Changes
Modified README.md
from [86dc4b58a5]
to [826335256c].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
ObjFW is a portable, lightweight framework for the Objective C language. It
enables you to write an application in Objective C that will run on any
platform supported by ObjFW without having to worry about differences between
operating systems or various frameworks that you would otherwise need if you
want to be portable.
See https://heap.zone/objfw for more information.
See https://objfw.nil.im/ for more information.
Table of Contents
=================
* [Installation](#installation)
* [macOS and iOS](#macos-and-ios)
|
︙ | | |
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
-
+
|
### Getting, building and installing ObjFW
Start the MinGW-w64 Win32 or Win64 Shell (depening on what version you want
to build - do *not* use the MSYS2 Shell shortcut, but use the MinGW-w64 Win32
or Win64 Shell shortcut instead!) and check out ObjFW:
$ git clone https://heap.zone/git/objfw.git
$ git clone https://git.nil.im/objfw.git
You can also download a release tarball if you want. Now go to the newly
checked out repository and build and install it:
$ ./autogen.sh && ./configure && make -j16 install
If everything was successfully, you can now build projects using ObjFW for
|
︙ | | |
Modified src/OFHTTPClient.m
from [25d21be32a]
to [0d964b4cba].
︙ | | |
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
-
+
|
[headers setObject: authorization
forKey: @"Authorization"];
}
if ([headers objectForKey: @"User-Agent"] == nil)
[headers setObject: @"Something using ObjFW "
@"<https://heap.zone/objfw>"
@"<https://objfw.nil.im/>"
forKey: @"User-Agent"];
if (request.protocolVersion.major == 1 &&
request.protocolVersion.minor == 0 &&
[headers objectForKey: @"Connection"] == nil)
[headers setObject: @"keep-alive"
forKey: @"Connection"];
|
︙ | | |
Modified src/OFHTTPServer.m
from [6c200c2182]
to [8b4765d161].
︙ | | |
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
|
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
|
-
+
|
}
- (instancetype)init
{
self = [super init];
_name = @"OFHTTPServer (ObjFW's HTTP server class "
@"<https://heap.zone/objfw/>)";
@"<https://objfw.nil.im/>)";
#ifdef OF_HAVE_THREADS
_numberOfThreads = 1;
#endif
return self;
}
|
︙ | | |
Modified src/OFSerialization.h
from [f1a3c81864]
to [c2b9f7cc16].
︙ | | |
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
-
+
|
* file.
*/
#import "OFObject.h"
OF_ASSUME_NONNULL_BEGIN
#define OF_SERIALIZATION_NS @"https://webkeks.org/objfw/serialization"
#define OF_SERIALIZATION_NS @"https://objfw.nil.im/serialization"
@class OFXMLElement;
/*!
* @protocol OFSerialization OFSerialization.h ObjFW/OFSerialization.h
*
* @brief A protocol for serializing objects.
|
︙ | | |
Modified tests/OFHTTPCookieManagerTests.m
from [72c4d891aa]
to [0364d9ffbe].
︙ | | |
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
|
- (void)HTTPCookieManagerTests
{
void *pool = objc_autoreleasePoolPush();
OFHTTPCookieManager *manager = [OFHTTPCookieManager manager];
OFURL *URL[4];
OFHTTPCookie *cookie[5];
URL[0] = [OFURL URLWithString: @"http://heap.zone/foo"];
URL[1] = [OFURL URLWithString: @"https://heap.zone/foo/bar"];
URL[2] = [OFURL URLWithString: @"https://test.heap.zone/foo/bar"];
URL[0] = [OFURL URLWithString: @"http://nil.im/foo"];
URL[1] = [OFURL URLWithString: @"https://nil.im/foo/bar"];
URL[2] = [OFURL URLWithString: @"https://test.nil.im/foo/bar"];
URL[3] = [OFURL URLWithString: @"http://webkeks.org/foo/bar"];
cookie[0] = [OFHTTPCookie cookieWithName: @"test"
value: @"1"
domain: @"heap.zone"];
domain: @"nil.im"];
TEST(@"-[addCookie:forURL:] #1", R([manager addCookie: cookie[0]
forURL: URL[0]]))
TEST(@"-[cookiesForURL:] #1",
[[manager cookiesForURL: URL[0]] isEqual:
[OFArray arrayWithObject: cookie[0]]])
cookie[1] = [OFHTTPCookie cookieWithName: @"test"
value: @"2"
domain: @"webkeks.org"];
TEST(@"-[addCookie:forURL:] #2", R([manager addCookie: cookie[1]
forURL: URL[0]]))
TEST(@"-[cookiesForURL:] #2",
[[manager cookiesForURL: URL[0]] isEqual:
[OFArray arrayWithObject: cookie[0]]] &&
[[manager cookiesForURL: URL[3]] isEqual: [OFArray array]])
cookie[2] = [OFHTTPCookie cookieWithName: @"test"
value: @"3"
domain: @"heap.zone"];
domain: @"nil.im"];
cookie[2].secure = true;
TEST(@"-[addCookie:forURL:] #3", R([manager addCookie: cookie[2]
forURL: URL[1]]))
TEST(@"-[cookiesForURL:] #3",
[[manager cookiesForURL: URL[1]] isEqual:
[OFArray arrayWithObject: cookie[2]]] &&
[[manager cookiesForURL: URL[0]] isEqual: [OFArray array]])
cookie[2].expires = [OFDate dateWithTimeIntervalSinceNow: -1];
cookie[3] = [OFHTTPCookie cookieWithName: @"test"
value: @"4"
domain: @"heap.zone"];
cookie[3].domain = @".heap.zone";
domain: @"nil.im"];
cookie[3].domain = @".nil.im";
TEST(@"-[addCookie:forURL:] #4", R([manager addCookie: cookie[3]
forURL: URL[1]]))
TEST(@"-[cookiesForURL:] #4",
[[manager cookiesForURL: URL[1]] isEqual:
[OFArray arrayWithObject: cookie[3]]] &&
[[manager cookiesForURL: URL[2]] isEqual:
[OFArray arrayWithObject: cookie[3]]])
cookie[4] = [OFHTTPCookie cookieWithName: @"bar"
value: @"5"
domain: @"test.heap.zone"];
domain: @"test.nil.im"];
TEST(@"-[addCookie:forURL:] #5", R([manager addCookie: cookie[4]
forURL: URL[0]]))
TEST(@"-[cookiesForURL:] #5",
[[manager cookiesForURL: URL[0]] isEqual:
[OFArray arrayWithObject: cookie[3]]] &&
[[manager cookiesForURL: URL[2]] isEqual:
|
︙ | | |
Modified tests/OFHTTPCookieTests.m
from [d536758f8f]
to [5858023a0b].
︙ | | |
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
+
-
+
-
+
|
static OFString *module = @"OFHTTPCookie";
@implementation TestsAppDelegate (OFHTTPCookieTests)
- (void)HTTPCookieTests
{
void *pool = objc_autoreleasePoolPush();
OFURL *URL = [OFURL URLWithString: @"http://heap.zone"];
OFURL *URL = [OFURL URLWithString: @"http://nil.im"];
OFHTTPCookie *cookie[2];
OFArray OF_GENERIC(OFHTTPCookie *) *cookies;
cookie[0] = [OFHTTPCookie cookieWithName: @"foo"
value: @"bar"
domain: @"heap.zone"];
domain: @"nil.im"];
TEST(@"+[cookiesWithResponseHeaderFields:forURL:] #1",
[[OFHTTPCookie cookiesWithResponseHeaderFields: [OFDictionary
dictionaryWithObject: @"foo=bar"
forKey: @"Set-Cookie"] forURL: URL]
isEqual: [OFArray arrayWithObject: cookie[0]]])
cookie[1] = [OFHTTPCookie cookieWithName: @"qux"
value: @"cookie"
domain: @"heap.zone"];
domain: @"nil.im"];
TEST(@"+[cookiesWithResponseHeaderFields:forURL:] #2",
[[OFHTTPCookie cookiesWithResponseHeaderFields: [OFDictionary
dictionaryWithObject: @"foo=bar,qux=cookie"
forKey: @"Set-Cookie"] forURL: URL]
isEqual: [OFArray arrayWithObjects: cookie[0], cookie[1], nil]])
cookie[0].expires = [OFDate dateWithTimeIntervalSince1970: 1234567890];
|
︙ | | |
Modified tests/OFSerializationTests.m
from [1c5f03d84b]
to [50a2e2daf3].
︙ | | |
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-
+
|
[d setObject: @"Hello"
forKey: a];
[d setObject: @"B\"la"
forKey: @"Blub"];
[l appendObject: @"Hello"];
[l appendObject: @"Wo\rld!\nHow are you?"];
[l appendObject: [OFURL URLWithString: @"https://webkeks.org/"]];
[l appendObject: [OFURL URLWithString: @"https://objfw.nil.im/"]];
[l appendObject:
[OFXMLElement elementWithXMLString: @"<x><y/><![CDATA[<]]></x>"]];
[l appendObject: [OFSet setWithObjects: @"foo", @"foo", @"bar", nil]];
[l appendObject:
[OFCountedSet setWithObjects: @"foo", @"foo", @"bar", nil]];
[d setObject: @"list"
|
︙ | | |
Modified tests/serialization.xml
from [4a5293ca90]
to [173d674534].
1
2
3
4
5
6
7
8
9
|
1
2
3
4
5
6
7
8
9
|
-
+
|
<?xml version='1.0' encoding='UTF-8'?>
<serialization xmlns='https://webkeks.org/objfw/serialization' version='1'>
<serialization xmlns='https://objfw.nil.im/serialization' version='1'>
<OFMutableDictionary>
<key>
<OFString>Blub</OFString>
</key>
<object>
<OFString>B"la</OFString>
</object>
|
︙ | | |
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
-
+
|
<OFString>Hello</OFString>
</object>
<key>
<OFList>
<OFString>Hello</OFString>
<OFString>Wo
ld!
How are you?</OFString>
<OFURL>https://webkeks.org/</OFURL>
<OFURL>https://objfw.nil.im/</OFURL>
<OFXMLElement name='x'>
<children>
<OFMutableArray>
<OFXMLElement name='y'/>
<OFXMLCDATA><![CDATA[<]]></OFXMLCDATA>
</OFMutableArray>
</children>
|
︙ | | |