11 Commits

Author SHA1 Message Date
Fred Nicolson
c8e03f2df8 Added more tests. Tweaks.
Receiving an http request/response will now return errors like HttpHeaderTooBig, instead of the type being set to that.

Added fr::Socket::status_to_string for converting status values into English strings.
2017-09-25 16:19:47 +01:00
Fred Nicolson
cfda0f969e Specified default move/copy constructors/operators to Http/Response/Request 2017-08-01 16:15:43 +01:00
Fred Nicolson
84382cad0b Made some changes recommended by Clang-Tidy. 2017-07-20 15:02:43 +01:00
Fred Nicolson
e748fde121 API changes, and lots of fixes.
fr::HttpSocket has been removed.

fr::Sendable has been added. Classes can inherit this if they want to be sendable through sockets. Both fr::Http (which is inherited by fr::HttpRequest and fr::HttpResponse), and fr::Packet inherit this, to allow them to be sent through fr::Socket::send()/fr::Socket::receive().

Fixed broken fr::SocketSelector and fr::SocketReactor, as they no longer accepted fr::Listener's due to fr::Listener no longer inheriting fr::Socket.
2017-07-18 17:34:49 +01:00
Unknown
93ec4fa999 Bug fixes
Fixed Content-Length header being added to Http responses even if there's a pre-existing one.

Fixed header parsing sometimes adding a carriage return to the header value.

Removed useless copy/move constructors from HttpResponse, causing issues.
2017-07-10 21:47:34 +01:00
Fred Nicolson
aa8509e460 Added move/copy constructors to Http & HttpResponse 2017-06-16 15:16:13 +01:00
Unknown
028677b01a Added tests. Improved error checking. Bug fixes.
Added fr::TcpListener tests.
2017-06-05 20:13:50 +01:00
Unknown
5778310798 Fixed incompatabilities between GCC and MSCV
Build errors have been fixed, but there are build warnings remaining about unsafe conversions, because Visual C++'s network conversion functions have a differing return type to mine. To be fixed in the future.
2017-05-28 18:09:29 +01:00
Fred Nicolson
6b1ef27764 Re-wrote HTML request/response parsing
It's now much more robust, supports requests received over multiple recvs. Supports POST variables. Supports 'content-length' header.
2017-04-10 17:24:57 +01:00
Fred Nicolson
5757eb776c Preparing to add support for larger HTTP requests 2017-04-06 14:07:03 +01:00
Cloaked9000
2de9540819 Added windows support. Updated build system.
CMake build system builds as a library, not an executable now.

Windows is now supported and should work fine.
2016-12-19 12:10:39 +00:00