ObjFW  All files named "src/OFHTTPServer.m"

History for src/OFHTTPServer.m

2024-02-03
11:41
Update copyright file: [1ba80fbd95] check-in: [7324ec8590] user: js, branch: 1.0, size: 20125 [annotate] [blame] [check-ins using] [diff]
2024-01-02
17:17
Update copyright file: [871d0707f6] check-in: [26ddd2e4e4] user: js, branch: trunk, size: 20104 [annotate] [blame] [check-ins using] [diff]
2023-10-15
14:55
Add OFHTTPRequestMethodString()

This deprecates OFHTTPRequestMethodName(), which returns a C string.
APIs should avoid C strings as much as possible.

This function was initially only used internally, where this was fine.
However, when it was made public, it should have been converted to
OFString at the same time.

Adds OFHTTPRequestMethodParseString() for consistency, which behaves the
same as OFHTTPRequestMethodParseName() and deprecates it. file: [c229043b21] check-in: [12c09ef41e] user: js, branch: trunk, size: 20104 [annotate] [blame] [check-ins using] [diff]

12:32
Add -[OFStream lowlevelIsAtEndOfStream]

This allows for a much cleaner solution to avoid the internal read
buffer of e.g. a TLS connection never being processed while waiting for
a delimiter. file: [ab884b4ab8] check-in: [a61e0594b4] user: js, branch: trunk, size: 20102 [annotate] [blame] [check-ins using] [diff]

2023-05-21
11:04
OFTCPSocket: Return socket address bound to file: [df8e40fa8b] check-in: [fc161d1948] user: js, branch: trunk, size: 20125 [annotate] [blame] [check-ins using] [diff]
2023-01-06
09:04
Update copyright file: [739a12c048] check-in: [8939cbdb52] user: js, branch: trunk, size: 20055 [annotate] [blame] [check-ins using] [diff]
2022-12-27
13:58
Rename OFAlready{Connected -> Open}Exception file: [ef058caeb6] check-in: [29a41e5a78] user: js, branch: trunk, size: 20055 [annotate] [blame] [check-ins using] [diff]
2022-11-24
00:21
Rename OFURI to OFIRI file: [cee3752fc6] check-in: [23272e6d43] user: js, branch: trunk, size: 20016 [annotate] [blame] [check-ins using] [diff]
2022-10-11
19:27
OFURI: Make scheme and path nonnull

This is as per the RFC, which says the scheme and path can never be
missing, while the path can be empty. file: [e75cf57b42] check-in: [3e455c4839] user: js, branch: trunk, size: 20016 [annotate] [blame] [check-ins using] [diff]

2022-09-28
21:40
Rename OFUR{L -> I} in preparation for URI support file: [684e137d81] check-in: [e7ab06503c] user: js, branch: trunk, size: 20020 [annotate] [blame] [check-ins using] [diff]
2022-09-12
08:52
Restrict subclassing on more classes file: [aa1c799693] check-in: [1038191a03] user: js, branch: trunk, size: 20008 [annotate] [blame] [check-ins using] [diff]
2022-08-30
00:48
OFObject: Small API change file: [de62217765] check-in: [4ad0c363f3] user: js, branch: trunk, size: 19982 [annotate] [blame] [check-ins using] [diff]
2022-05-20
09:36
OFHTTPServer: Send 400 on invalid path/query file: [56dd1ea76e] check-in: [f67621fa4d] user: js, branch: trunk, size: 19982 [annotate] [blame] [check-ins using] [diff]
2022-02-12
07:46
Update copyright file: [879c93d87f] check-in: [1a86b8175b] user: js, branch: trunk, size: 19839 [annotate] [blame] [check-ins using] [diff]
2022-01-28
19:34
Don't assume EWOULDBLOCK and EAGAIN are the same file: [7cab88af66] check-in: [d9586ed175] user: js, branch: trunk, size: 19839 [annotate] [blame] [check-ins using] [diff]
2021-11-13
13:04
Completely rework the TLS/SSL API

The previous API could never work cleanly and would always require
hacks, as it needed intercepting all interactions of OFTCPSocket with
the raw socket and did not work at all if the OFTCPSocket had anything
in its read buffer before starting the TLS handshake. This also could
not be fixed easily, as it would have required the object to contain two
read buffers, one for the unencrypted connection and one for the
encrypted connection. There was also no clean way to perform the
handshake in a non-blocking way.

The new API is a lot cleaner and requires none of the hacks, but using
it requires slightly more work. But this is more than made up for by
making a fully asynchronous handshake possible. It uses the concept of a
stream wrapping another stream, meaning the entire connecting part is
being handled by OFTCPSocket and then the connected socket is passed off
to OFTLSStream to wrap it. This also makes for a lot cleaner separation
of concerns. file: [9d3b80f535] check-in: [d30efa8bbf] user: js, branch: trunk, size: 19818 [annotate] [blame] [check-ins using] [diff]

2021-11-06
15:57
OFStream: New write API

The old write API made it too easy to lose bytes when a stream is set to
non-blocking mode. The new API always throws when not all bytes were
written, which forces handling the number of bytes being written being
smaller than the number of bytes requested to be written. file: [fa53a5562c] check-in: [d1d36ae522] user: js, branch: trunk, size: 19842 [annotate] [blame] [check-ins using] [diff]

2021-11-05
22:42
Remove TLS server support

The current API is too tied to OpenSSL. file: [48c91c9511] check-in: [a5a3047210] user: js, branch: trunk, size: 19680 [annotate] [blame] [check-ins using] [diff]

2021-08-07
23:25
Make Apple GCC 4.0.1 happy again file: [d1a692f4d4] check-in: [176e97bd4d] user: js, branch: trunk, size: 21123 [annotate] [blame] [check-ins using] [diff]
2021-04-25
19:58
Last round of renames (hopefully) file: [76527fc01b] check-in: [6ae98c1dcf] user: js, branch: trunk, size: 21105 [annotate] [blame] [check-ins using] [diff]
19:41
OFStrdup -> OFStrDup and slightly change behavior file: [40f5819df6] check-in: [fd51df7022] user: js, branch: trunk, size: 21105 [annotate] [blame] [check-ins using] [diff]
11:05
A few last renames file: [77f28b39f4] check-in: [27103855c2] user: js, branch: new-naming-convention, size: 21220 [annotate] [blame] [check-ins using] [diff]
2021-04-19
22:20
Rename all remaining enums file: [ab2a6a96d7] check-in: [e97b03815f] user: js, branch: new-naming-convention, size: 21246 [annotate] [blame] [check-ins using] [diff]
2021-04-18
22:56
Rename all symbols marked extern file: [77e13e0b81] check-in: [e73c65a849] user: js, branch: new-naming-convention, size: 21214 [annotate] [blame] [check-ins using] [diff]
20:51
Rename everything in several smaller files file: [d0e0c65c22] check-in: [35de667566] user: js, branch: new-naming-convention, size: 21220 [annotate] [blame] [check-ins using] [diff]
15:55
Rename all functions in macros.h file: [54081a8164] check-in: [7392685ffc] user: js, branch: new-naming-convention, size: 21219 [annotate] [blame] [check-ins using] [diff]
2021-04-17
22:45
Rename of_(re)alloc and add OFFreeMemory file: [296355eaa4] check-in: [498074dab9] user: js, branch: new-naming-convention, size: 21233 [annotate] [blame] [check-ins using] [diff]
14:33
Rename of_http_* file: [eb0e97662f] check-in: [83d8f3e5f6] user: js, branch: new-naming-convention, size: 21225 [annotate] [blame] [check-ins using] [diff]
14:13
Always prefix functions with the type file: [c6a414493d] check-in: [eb0cfa6ff9] user: js, branch: new-naming-convention, size: 21265 [annotate] [blame] [check-ins using] [diff]
02:25
Rename remaining enums in OFString.h file: [372c0e044a] check-in: [169692a120] user: js, branch: new-naming-convention, size: 21265 [annotate] [blame] [check-ins using] [diff]
01:32
of_unichar_t -> OFUnichar file: [00c510fad6] check-in: [2d3790870d] user: js, branch: new-naming-convention, size: 21272 [annotate] [blame] [check-ins using] [diff]
01:24
OF_NOT_FOUND -> OFNotFound file: [8530766b9d] check-in: [83dc0fe6e5] user: js, branch: new-naming-convention, size: 21275 [annotate] [blame] [check-ins using] [diff]
00:44
of_range_t -> OFRange file: [72e3c9c242] check-in: [d975c53a43] user: js, branch: new-naming-convention, size: 21287 [annotate] [blame] [check-ins using] [diff]
2021-03-07
20:25
*.m: Fold methods into one line where it fits file: [bf72062f11] check-in: [1b82d3bf4f] user: js, branch: trunk, size: 21284 [annotate] [blame] [check-ins using] [diff]
02:36
Style change: Allow more than 1 argument per line

This is only migrating some places, others will be migrated as they are
touched. file: [038308e952] check-in: [a0fd103a0b] user: js, branch: trunk, size: 21359 [annotate] [blame] [check-ins using] [diff]

2021-01-02
22:04
Update copyright file: [93f1451d06] check-in: [374e1a1bfa] user: js, branch: trunk, size: 21382 [annotate] [blame] [check-ins using] [diff]
2020-11-06
02:24
Future-proof some code using freeWhenDone

While -[OFData initWithDataNoCopy:count:itemSize:freeWhenDone:] can
currently never throw, it might in the future, and when it does so in
the future, these would be memory leaks then. file: [ac3250a22a] check-in: [a2b4238850] user: js, branch: trunk, size: 21471 [annotate] [blame] [check-ins using] [diff]

2020-11-01
11:35
OFString: Add -[substring{From,To}Index:] file: [59a786282c] check-in: [4bbac7ab17] user: js, branch: trunk, size: 21410 [annotate] [blame] [check-ins using] [diff]
2020-10-10
10:58
Make HTTP status code consistently a short

It used to be a short in some places and an int in other places. file: [28acc739df] check-in: [6e42ee482f] user: js, branch: trunk, size: 21688 [annotate] [blame] [check-ins using] [diff]

2020-08-25
00:11
OFNumber: Remove (u)int{8,16,32,64} methods

Since C guarantees minimum sizes for char, short, int, long and long
long, these can be used instead. file: [abf9a790cd] check-in: [25c985fec1] user: js, branch: trunk, size: 21686 [annotate] [blame] [check-ins using] [diff]

2020-08-11
19:45
OFString: Rework number parsing API

This solves the old signed vs. unsigned problem and allows for more
bases than just 8, 10 and 16, as well as auto-detection of the base (if
base is 0). file: [0eb4bcc334] check-in: [b6ee372b98] user: js, branch: trunk, size: 21679 [annotate] [blame] [check-ins using] [diff]

2020-06-28
15:03
Use OF_DIRECT(_MEMBERS) where appropriate file: [868929166e] check-in: [b6cb3addd0] user: js, branch: trunk, size: 21480 [annotate] [blame] [check-ins using] [diff]
2020-04-26
18:10
Move accept and listen OF{TCP -> Stream}Socket file: [9e1f23cc19] check-in: [13a8f43898] user: js, branch: trunk, size: 21408 [annotate] [blame] [check-ins using] [diff]
2020-04-24
00:21
Add OFIPStreamSocket

This is a new superclass for OFTCPSocket to allow sharing code with
other IP stream socket types, namely SCTP. file: [1d12ee9c38] check-in: [3dfe642dd3] user: js, branch: trunk, size: 21397 [annotate] [blame] [check-ins using] [diff]

2020-04-11
16:31
OFHTTP*: Use -[asyncReadLine:] for chunk size file: [c13e2bacd9] check-in: [ba4a65d397] user: js, branch: trunk, size: 21372 [annotate] [blame] [check-ins using] [diff]
2020-04-01
22:36
Use case insensitive compare for URL scheme file: [cf25c913ea] check-in: [ccc1b1989d] user: js, branch: trunk, size: 21336 [annotate] [blame] [check-ins using] [diff]
2020-03-29
14:04
OFHTTP{Client,Server}: Reject empty Content-Length file: [0402f29968] check-in: [e833a8b212] user: js, branch: trunk, size: 21355 [annotate] [blame] [check-ins using] [diff]
03:05
OFHTTPClient: Minor chunked body improvement file: [b25900c5f7] check-in: [d9350dba53] user: js, branch: trunk, size: 21329 [annotate] [blame] [check-ins using] [diff]
2020-03-28
14:35
OFHTTPServer: Support for chunked request bodies file: [269e3a7f9d] check-in: [8faade8d19] user: js, branch: trunk, size: 21341 [annotate] [blame] [check-ins using] [diff]
2020-03-22
16:15
ofhttp: Allow all request methods file: [a8548d7f01] check-in: [a013a9d577] user: js, branch: trunk, size: 18804 [annotate] [blame] [check-ins using] [diff]
15:51
ofhttp: Print the HTTP status code on error

Without this, there would be no indication of the error when using -q. file: [69c85c4501] check-in: [9c506fc995] user: js, branch: trunk, size: 18813 [annotate] [blame] [check-ins using] [diff]

2020-01-14
00:16
More consistent -[close] behavior

This means refusing to close twice, calling -[close] from -[dealloc] and
not calling -[cancelAsyncRequests].

Calling -[cancelAsyncRequests] in -[close] is too dangerous, as -[close]
gets called by -[dealloc]: If the queue is the last reference to the
object, at the point where -[cancelAsyncRequests] removes it from the
queue, the object will start to deallocate and call into
-[cancelAsyncRequests] again, which is still in the middle of removing
it and now finds itself with an inconsistent state. file: [e03c4b06ca] check-in: [3b43d51006] user: js, branch: trunk, size: 20441 [annotate] [blame] [check-ins using] [diff]

2020-01-05
02:05
Update URL in a few places file: [8b4765d161] check-in: [0f99128a67] user: js, branch: trunk, size: 20356 [annotate] [blame] [check-ins using] [diff]
2020-01-02
01:51
Update copyright file: [6c200c2182] check-in: [c7f0229795] user: js, branch: trunk, size: 20359 [annotate] [blame] [check-ins using] [diff]
2019-08-11
18:56
Support sockets in multiple threads on AmigaOS file: [afbff9f08f] check-in: [a40f3fc829] user: js, branch: trunk, size: 20356 [annotate] [blame] [check-ins using] [diff]
2019-06-17
02:33
Remove underscores from class names file: [59f972c93b] check-in: [17d57e01ff] user: js, branch: trunk, size: 20322 [annotate] [blame] [check-ins using] [diff]
2019-03-12
23:46
generators: Use dot syntax file: [a4d123787e] check-in: [ad7d75df4b] user: js, branch: trunk, size: 20326 [annotate] [blame] [check-ins using] [diff]
2019-03-08
00:35
Use dot syntax file: [3cdaff788f] check-in: [bceb7ed4c9] user: js, branch: trunk, size: 20343 [annotate] [blame] [check-ins using] [diff]
2019-03-03
12:40
OFHTTPServer: Support for using multiple threads file: [503afee9ba] check-in: [607cd05ad7] user: js, branch: trunk, size: 20654 [annotate] [blame] [check-ins using] [diff]
2019-01-03
19:13
Update copyright file: [e825f297c5] check-in: [0509d7a844] user: js, branch: trunk, size: 17636 [annotate] [blame] [check-ins using] [diff]
2018-12-11
22:57
Include an exception in delegate methods

Otherwise, there would be two methods for every operation: One for
success and one for failure. It also makes it easy to forget about
handling failure, so it's better to always pass an optional exception. file: [aae9d41f78] check-in: [064dbe5127] user: js, branch: trunk, size: 17630 [annotate] [blame] [check-ins using] [diff]

2018-12-08
16:53
Separate error methods for async method delegates file: [814464cd03] check-in: [2b6a12065e] user: js, branch: trunk, size: 17613 [annotate] [blame] [check-ins using] [diff]
16:05
OFTCPSocket: Use a delegate for async operations file: [abf11296e3] check-in: [27153bf8cf] user: js, branch: trunk, size: 17604 [annotate] [blame] [check-ins using] [diff]
2018-12-07
01:33
OFStream: Use a delegate for async operations

The target / selector approach had several drawbacks:

* It was inconvenient to use, as for every read or write, a target,
selector and context would need to be specified.
* It lacked any kind of type-safety and would not even warn about using
a callback method with the wrong number of parameters.
* It encouraged using a different callback method for each read or
write call, which results in code that is hard to follow and also
slower (as it needs to recreate the async operation with a new
callback every time). file: [fe26303808] check-in: [d16ad96cbd] user: js, branch: trunk, size: 17752 [annotate] [blame] [check-ins using] [diff]

2018-11-10
10:01
OFHTTPServer: Add support for TLS file: [7cb45bbee2] check-in: [f6d9264de0] user: js, branch: trunk, size: 18078 [annotate] [blame] [check-ins using] [diff]
2018-02-27
20:36
OFHTTP{Client,Server}: Rename body to requestBody

This makes it more clear that this has nothing to do with the body of
the response, as the body of the response is read from the
OFHTTPResponse itself. file: [d2c22eea59] check-in: [d375061886] user: js, branch: trunk, size: 17226 [annotate] [blame] [check-ins using] [diff]

2018-02-25
02:38
OFHTTPServer: Move the body out of the request

Instead, provide a stream for the body to the callback. file: [b47d8bb3a2] check-in: [f756fb2ff6] user: js, branch: trunk, size: 17177 [annotate] [blame] [check-ins using] [diff]

2018-01-18
23:28
OFHTTPServer: Fix missing cast file: [2088c9d68e] check-in: [cb0ac3f868] user: js, branch: trunk, size: 17175 [annotate] [blame] [check-ins using] [diff]
2018-01-14
13:30
OFHTTPServer: Fix _contentLength not being set file: [949fef07b2] check-in: [a74b645cb2] user: js, branch: trunk, size: 17167 [annotate] [blame] [check-ins using] [diff]
2018-01-03
19:49
Update copyright notice file: [2d02abe498] check-in: [7e5c81e186] user: js, branch: trunk, size: 17013 [annotate] [blame] [check-ins using] [diff]
2017-11-19
11:04
Do not conform to OFReadyFor*Observing by default

Instead of letting OFStream conform to it, which itself does not really
conform to it, let all the subclasses that actually do conform to it. file: [1522d55623] check-in: [69749b6a5b] user: js, branch: trunk, size: 16990 [annotate] [blame] [check-ins using] [diff]

2017-11-06
23:01
OFURL: Store the URL-encoded version internally

This allows retrieving it how it was originally stored, which is useful
for example for query strings, as these often URL-encode allowed
characters in order to allow pairs of the form foo=bar&bar=qux. file: [3bc806eac7] check-in: [a15b403a11] user: js, branch: trunk, size: 16961 [annotate] [blame] [check-ins using] [diff]

2017-10-28
21:08
Make OFURL more generic

This removes the special handling dependent on the scheme. file: [380d4e5179] check-in: [0f995db06d] user: js, branch: trunk, size: 16931 [annotate] [blame] [check-ins using] [diff]

2017-10-22
15:05
Make Apple GCC with -Wshadow happy file: [a75e2ea261] check-in: [a06354b42a] user: js, branch: trunk, size: 16862 [annotate] [blame] [check-ins using] [diff]
14:09
Make Apple GCC with -Wshadow happy file: [ae0dbd61af] check-in: [31c0f5b89e] user: js, branch: 0.90, size: 16539 [annotate] [blame] [check-ins using] [diff]
2017-10-17
00:33
Do not use implicit method return types

Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. file: [339d905a8d] check-in: [2f4e0df8be] user: js, branch: trunk, size: 16887 [annotate] [blame] [check-ins using] [diff]

2017-09-28
23:02
Enable -Wnullable-to-nonnull-conversion and adjust file: [f5a4b0ce8e] check-in: [2de9660312] user: js, branch: trunk, size: 16815 [annotate] [blame] [check-ins using] [diff]
2017-09-24
12:24
OFStream: Add support for async writes file: [1e27dfeb94] check-in: [481225349f] user: js, branch: trunk, size: 16803 [annotate] [blame] [check-ins using] [diff]
11:24
Change type for async exceptions to id file: [e701818685] check-in: [f8498bb114] user: js, branch: trunk, size: 16752 [annotate] [blame] [check-ins using] [diff]
2017-09-23
22:07
Support for passing a context to async IO handlers file: [f88ae06cce] check-in: [958da109d3] user: js, branch: trunk, size: 16818 [annotate] [blame] [check-ins using] [diff]
2017-07-22
20:50
Split OFDataArray into OFData and OFMutableData file: [c477e44d18] check-in: [c8f7b90082] user: js, branch: trunk, size: 16564 [annotate] [blame] [check-ins using] [diff]
2017-07-20
22:28
Split OFURL into OFURL and OFMutableURL file: [db503301c5] check-in: [3a5570ab20] user: js, branch: trunk, size: 16539 [annotate] [blame] [check-ins using] [diff]
2017-06-21
20:20
OFHTTPServer: Include the / in the URL path

This was overlooked when URLs were changed to include the / in the path. file: [d18b7e3988] check-in: [2b6fb5530e] user: js, branch: trunk, size: 16502 [annotate] [blame] [check-ins using] [diff]

2017-05-21
21:28
Prefix private methods with of_ instead of OF_

This matches Apple's style. file: [4d2868ce13] check-in: [6b77a5dd8b] user: js, branch: trunk, size: 16552 [annotate] [blame] [check-ins using] [diff]

2017-05-07
20:10
Small code style change

Casts are now written like types in variable declarations. file: [6f3529bdbf] check-in: [4af49a13c3] user: js, branch: trunk, size: 16552 [annotate] [blame] [check-ins using] [diff]

2017-05-06
19:43
Clean up a few includes file: [84e4421360] check-in: [cca678886f] user: js, branch: trunk, size: 16514 [annotate] [blame] [check-ins using] [diff]
2017-01-09
17:36
Update copyright

Forgot to add 2017, even though I already did quite some changes in
2017. file: [fe9e1ee8d4] check-in: [44f45c2e35] user: js, branch: trunk, size: 16533 [annotate] [blame] [check-ins using] [diff]

2017-01-07
00:37
Add of_ascii_{to{upper,lower},is{alpha,alnum}}

These are independent of the locale and work on the ASCII character set.

Unlike the C ones, these are 8-bit safe, meaning if a character > 0x7F
is passed, is{alpha,alnum} returns false and to{upper,lower} returns the
original character. file: [30505eba7a] check-in: [d9eb7b50b3] user: js, branch: trunk, size: 16527 [annotate] [blame] [check-ins using] [diff]

2016-06-07
22:56
Add support for reusing OFStreams after close

Right now, this is only useful for OFTCPSocket, as this is the only
class so far not establishing the stream in the init method. However,
this adds the general infrastructure to allow reuse to all subclasses of
OFStream. file: [28126036a1] check-in: [1de551cb5f] user: js, branch: trunk, size: 16488 [annotate] [blame] [check-ins using] [diff]

2016-06-05
21:17
Always cast to unsigned char for to{upper,lower}()

This is required as passing something signed to it is an error on
NetBSD, but passing anything else than a char is undefined on Linux. file: [b9d140020a] check-in: [09a0d12bae] user: js, branch: trunk, size: 16471 [annotate] [blame] [check-ins using] [diff]

2016-03-20
15:25
OFHTTPServer: Delegate for client socket exception file: [9171dc644f] check-in: [3b20e90066] user: js, branch: 0.8, size: 16633 [annotate] [blame] [check-ins using] [diff]
15:24
OFHTTPServer: Delegate for client socket exception file: [eb56a06a9a] check-in: [3acdce88f5] user: js, branch: trunk, size: 16459 [annotate] [blame] [check-ins using] [diff]
2016-01-05
14:55
OFHTTPServer: Allow setting name to nil

Setting it to nil means no Server header is sent. file: [e2c16ad886] check-in: [6b4d138cc3] user: js, branch: trunk, size: 15936 [annotate] [blame] [check-ins using] [diff]

14:10
Better randomization of HTTP header order

This should randomize the order of all headers now, preventing
fingerprinting by the order of HTTP headers. file: [5b5e9e2174] check-in: [58d4025602] user: js, branch: trunk, size: 15884 [annotate] [blame] [check-ins using] [diff]

2016-01-03
00:43
Update copyright

While at it, also update the mail address. file: [aed0368bbf] check-in: [cec0f072f8] user: js, branch: 0.8, size: 16110 [annotate] [blame] [check-ins using] [diff]

00:41
Update copyright

While at it, also update the mail address. file: [9cfe1fbff0] check-in: [2a27cf3000] user: js, branch: trunk, size: 15701 [annotate] [blame] [check-ins using] [diff]

2015-11-29
14:23
Clean up class extensions

Now that we can require GCC >= 4.6, we no longer need to fall back to
using a category on old compilers. file: [3f7a396278] check-in: [2aca549d60] user: js, branch: trunk, size: 15697 [annotate] [blame] [check-ins using] [diff]

11:43
Make properties a requirement and clean up code

This increases the required GCC version from 4.0 to 4.6 (exception:
Apple GCC, which already supports this with >= 4.0 starting with OS X
10.5). Since even GCC 4.6 is really old by now, there is no point in
still supporting something even older and making the code ugly because
of that. While some hardware and OS support was dropped from GCC 4.6
compared to GCC 4.0, there is nothing in there that would be an
interesting target with the exception of BeOS maybe - but a port to BeOS
can also be achieved using the Haiku support. The other dropped OSes are
mostly old versions of OSes while newer ones are still being supported
(and those newer versions of those OSes still support the same
hardware). file: [c7dbee91dc] check-in: [48980f2297] user: js, branch: trunk, size: 15716 [annotate] [blame] [check-ins using] [diff]

2015-11-02
13:53
OFHTTP{Client,Server}: Concatenate repeated fields file: [c9577b3169] check-in: [b73d25b8c6] user: js, branch: trunk, size: 16106 [annotate] [blame] [check-ins using] [diff]
2015-05-23
11:21
OFHTTPRequest: Rename entity to body file: [0ddfcecf31] check-in: [c8877fd278] user: js, branch: trunk, size: 15989 [annotate] [blame] [check-ins using] [diff]
2015-05-06
20:18
OFNotConnectedException -> OFNotOpenException file: [c3a8a62614] check-in: [ff759684e2] user: js, branch: trunk, size: 16005 [annotate] [blame] [check-ins using] [diff]
2015-04-26
08:54
Small improvements for OFHTTPClient & OFHTTPServer file: [d46048ca78] check-in: [0a249f58cf] user: js, branch: trunk, size: 16020 [annotate] [blame] [check-ins using] [diff]
2015-03-22
11:42
Abstract int vs SOCKET as of_socket_t file: [5ac9f0f46d] check-in: [099e939079] user: js, branch: trunk, size: 15766 [annotate] [blame] [check-ins using] [diff]
2015-01-03
20:57
Update copyright file: [5b74303c4d] check-in: [cfd374b906] user: js, branch: trunk, size: 15783 [annotate] [blame] [check-ins using] [diff]
2014-12-07
18:18
OFHTTPServer: Fix warning on Win64 file: [16d942747a] check-in: [372ed8b399] user: js, branch: trunk, size: 15777 [annotate] [blame] [check-ins using] [diff]
2014-08-21
19:00
OFHTTPServer: Don't close the socket manually

Closing it manually causes the fd to become invalid before it is removed
from the OFKernelEventObserver. file: [36dd983976] check-in: [b87a5d3b46] user: js, branch: trunk, size: 15772 [annotate] [blame] [check-ins using] [diff]

2014-07-07
00:50
OFURL: Don't include the leading "/" in path

While Cocoa includes it, RFC 1738 explicitly states that the "/" between
host / port and path is not part of the path. file: [3efdaebeee] check-in: [d2487bc7e1] user: js, branch: trunk, size: 15501 [annotate] [blame] [check-ins using] [diff]

2014-06-21
21:43
Move all macros from OFObject.h to macros.h

This means that OFObject.h imports macros.h now, making it unnecessary
to manually import macros.h in almost every file. And while at it, also
import autorelease.h in OFObject.h, so that this doesn't need to be
manually imported in almost every file as well. file: [79b7aacf76] check-in: [13ee56edf3] user: js, branch: trunk, size: 15354 [annotate] [blame] [check-ins using] [diff]

2014-05-31
17:57
OFStream: Add -[hasDataInReadBuffer].

This replaces -[numberOfBytesInReadBuffer], as it's not always known how
many bytes there are exactly and thus the number would often be wrong
(e.g. because data is compressed). file: [7f98124205] check-in: [acc999a75e] user: js, branch: trunk, size: 15398 [annotate] [blame] [check-ins using] [diff]

2014-02-13
23:26
Use -std=c11 instead of -std=gnu11

Not using -std=gnu11 means _GNU_SOURCE does not get defined anymore,
therefore this commit also adds the required feature defines for glibc.

Additionally, this adds of_strdup in macros.h, as strdup is an
extension. file: [48d8bdc4b1] check-in: [2f5af58573] user: js, branch: trunk, size: 15389 [annotate] [blame] [check-ins using] [diff]

2014-02-11
14:44
OFHTTPServer: Allow binding to port 0

This allows binding to a random port and calling [server port] to get
the port used. file: [3104ed8898] check-in: [1724525754] user: js, branch: trunk, size: 15386 [annotate] [blame] [check-ins using] [diff]

2014-01-04
00:24
Update copyright. file: [2f642831d8] check-in: [3b97fc3cd9] user: js, branch: trunk, size: 15391 [annotate] [blame] [check-ins using] [diff]
2013-12-05
17:48
Make coding style consistent.

A file documenting the coding style will be written soon. This will
hopefully prevent conflicts in the future, such as whether static
functions are written in camelCase or_with_underscores, like was the
case here. file: [6a0ef70d6f] check-in: [fa6496efc7] user: js, branch: trunk, size: 15385 [annotate] [blame] [check-ins using] [diff]

2013-09-29
19:44
Get rid of a warning on 32-bit systems with Clang. file: [5da55a3a8f] check-in: [90de201b43] user: js, branch: trunk, size: 15396 [annotate] [blame] [check-ins using] [diff]
2013-09-28
15:25
OFHTTP{Client,Server}: Handle all request methods. file: [9bf4d2786d] check-in: [7be34d8c40] user: js, branch: trunk, size: 15388 [annotate] [blame] [check-ins using] [diff]
01:50
Improve HTTP request method handling. file: [86738768aa] check-in: [c76896d937] user: js, branch: trunk, size: 15711 [annotate] [blame] [check-ins using] [diff]
2013-08-15
19:00
Move private methods into private headers. file: [80673ced7f] check-in: [1d7a1cbca0] user: js, branch: trunk, size: 15708 [annotate] [blame] [check-ins using] [diff]
2013-07-29
19:43
Rename OFHTTPRequestReply to OFHTTPResponse. file: [ce19d575cc] check-in: [36d0b1e2d8] user: js, branch: trunk, size: 15533 [annotate] [blame] [check-ins using] [diff]
2013-06-22
12:12
Rework exceptions.

This mostly removes the argument for the class in which the exception
occurred. As backtraces were recently added for all platforms, the
passed class does not give any extra information on where the exception
occurred anymore.

This also removes a few other arguments which were not too helpful. In
the past, the idea was to pass as many arguments as possible so that it
is easier to find the origin of the exception. However, as backtraces
are a much better way to find the origin, those are not useful anymore
and just make the exception more cumbersome to use. The rule is now to
only pass arguments that might help in recovering from the exception or
provide information that is otherwise not easily accessible. file: [0971f78b90] check-in: [3d16a30f41] user: js, branch: trunk, size: 15499 [annotate] [blame] [check-ins using] [diff]

2013-04-10
20:56
OFHTTPServer: Fix an evil typo. file: [0c9c549df6] check-in: [9ea5f2723f] user: js, branch: trunk, size: 15625 [annotate] [blame] [check-ins using] [diff]
2013-03-04
17:20
Replace BOOL with bool.

The only places where BOOL is left are those where they are required by
the ABI. file: [a4708f3429] check-in: [c5ef582958] user: js, branch: trunk, size: 15624 [annotate] [blame] [check-ins using] [diff]

2013-02-12
18:22
Prefix all ivars with an underscore. file: [7e47217e14] check-in: [e40729d406] user: js, branch: trunk, size: 15570 [annotate] [blame] [check-ins using] [diff]
2013-02-05
22:24
Move abort() to make old GCCs happy. file: [4524bb5e96] check-in: [737a82e1a4] user: js, branch: trunk, size: 15322 [annotate] [blame] [check-ins using] [diff]
2013-01-28
22:40
OFHTTPServer: Fix missing #import. file: [8f1d483c7d] check-in: [fe4a1fb193] user: js, branch: trunk, size: 15291 [annotate] [blame] [check-ins using] [diff]
2013-01-26
00:13
Make OFHTTPRequestReply a stream.

This also implements chunked transfer encoding for OFHTTPServer and adds
a property for the protocol version to OFHTTPRequest(Reply).

Additionally, this makes it possible to add an async version of
OFHTTPClient. file: [3a7faef063] check-in: [bdf9c4d96b] user: js, branch: trunk, size: 15267 [annotate] [blame] [check-ins using] [diff]

2013-01-23
21:52
Never compare to @"", use length instead. file: [34f30ba48f] check-in: [ea4a43461c] user: js, branch: trunk, size: 14287 [annotate] [blame] [check-ins using] [diff]
2013-01-14
23:21
OFHTTPServer: Always send Server and Date.

This also makes sure those aren't sent twice in case they are also in
the headers. file: [85b2274e9b] check-in: [8472e9eade] user: js, branch: trunk, size: 14288 [annotate] [blame] [check-ins using] [diff]

2013-01-09
22:24
Update copyright. file: [9f5abefa32] check-in: [813c00ccf0] user: js, branch: trunk, size: 14294 [annotate] [blame] [check-ins using] [diff]
2012-12-27
11:21
OFHTTPServer: Pass errors from listening socket.

This way, it is possible to recover from errors by e.g. stopping the
server in the main thread and then restarting it, or by just ignoring
the exception. file: [f75ba40071] check-in: [df7b88405a] user: js, branch: trunk, size: 14288 [annotate] [blame] [check-ins using] [diff]

2012-12-26
20:55
OFHTTPRequestResult -> OFHTTPRequestReply.

The class also has its own file now. file: [80903ac435] check-in: [75f187cef5] user: js, branch: trunk, size: 14089 [annotate] [blame] [check-ins using] [diff]

19:07
OFHTTPServer: Correctly put the query in the URL.

Before, it incorrectly was part of the path instead of being in the
query field. file: [a3b1ef98c3] check-in: [f8a7660ac7] user: js, branch: trunk, size: 14059 [annotate] [blame] [check-ins using] [diff]

2012-12-22
15:37
Add -[doesNotRecognizeSelector:]. file: [3793430199] check-in: [917ce5754c] user: js, branch: trunk, size: 13748 [annotate] [blame] [check-ins using] [diff]
2012-12-20
16:42
Remove dummy implementations for formal protocols. file: [0d0597589f] check-in: [89177dcd09] user: js, branch: trunk, size: 13786 [annotate] [blame] [check-ins using] [diff]
14:24
OFHTTPServer: Add a timeout. file: [91602836ad] check-in: [27120e14ca] user: js, branch: trunk, size: 14068 [annotate] [blame] [check-ins using] [diff]
13:03
OFHTTPServer: Make is possible to stop the server. file: [862d84b05e] check-in: [a31bba0947] user: js, branch: trunk, size: 13645 [annotate] [blame] [check-ins using] [diff]
2012-12-15
20:35
OFHTTPRequest: Add property remoteAddress. file: [bee3baba47] check-in: [b8d3e09eff] user: js, branch: trunk, size: 13566 [annotate] [blame] [check-ins using] [diff]
19:36
OFHTTPServer: Fix handling of Host:. file: [0a1464d83e] check-in: [2fb248a952] user: js, branch: trunk, size: 13515 [annotate] [blame] [check-ins using] [diff]
17:52
OFDataArray: Improve API. file: [61524a3f46] check-in: [c85ff8d35a] user: js, branch: trunk, size: 13468 [annotate] [blame] [check-ins using] [diff]
2012-12-14
01:42
Rename -[OFHTTPRequest postData] to POSTData. file: [e6f92f7b1d] check-in: [fbb9df7439] user: js, branch: trunk, size: 13482 [annotate] [blame] [check-ins using] [diff]
2012-12-12
18:57
Small conformance fix for OFHTTPServer + OFURL. file: [2f6eab66c7] check-in: [41480893fc] user: js, branch: trunk, size: 13482 [annotate] [blame] [check-ins using] [diff]
2012-12-11
16:38
OFHTTPRequest: Add the current date if necessary. file: [0de4511755] check-in: [d330801ded] user: js, branch: trunk, size: 13429 [annotate] [blame] [check-ins using] [diff]
14:40
OFHTTPServer: Make the server name configurable. file: [f2e30645b9] check-in: [eea79730f4] user: js, branch: trunk, size: 13235 [annotate] [blame] [check-ins using] [diff]
12:32
OFHTTPServer: Small fixes. file: [bee61430ab] check-in: [e0c2d4af24] user: js, branch: trunk, size: 13065 [annotate] [blame] [check-ins using] [diff]
12:12
Added: Add OFHTTPServer. file: [019519d771] check-in: [190b9d3a5c] user: js, branch: trunk, size: 13022 [annotate] [blame] [check-ins using]