summaryrefslogtreecommitdiffstats
path: root/src/HTTP (follow)
Commit message (Collapse)AuthorAgeFilesLines
* HTTPServerConnection: more robust error handlingTiger Wang2020-11-141-21/+18
| | | | | | * Fix passing a nullptr to downstream code when the request was malformed + Reset the connection on errors * Fixes #5029
* Upgrade to C++17 [CMake] (#4717)Tiger Wang2020-05-161-8/+2
| | | * Make our CMake slightly less insane
* Enable some more clang-tidy linter checks (#4738)peterbell102020-05-156-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Avoid inefficient AString -> c_str() -> AString round trip * Avoid redundant string init expressions * Avoid unnecessary return, continue, etc. * Add .clang-format to help with clang-tidy fix-its * Avoid unnecessary passing by value * Avoid unnecessary local copying * Avoid copying in range-for loops * Avoid over-complicated boolean expressions * Some violations missed by my local clang-tidy * Allow unnecessary continue statements * Add brackets * Another expression missed locally * Move BindingsProcessor call into clang-tidy.sh and add space * Fix pushd not found error * Different grouping of CheckBlockInteractionRate
* Using Super.Mattes D2020-04-166-13/+22
|
* Force all headers other than "Globals.h" to be included with relative paths (#4269)peterbell102018-08-294-7/+4
| | | | | | | Closes #4236 CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/". #include "Globals.h" still works by including the build generated file and any other src-relative path will not work.
* CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell102018-07-265-4/+2
| | | | Add check for number of empty lines between functions and fix the corresponding failures
* Prefer static_cast to reinterpret_cast (#4223)peterbell102018-05-022-2/+2
| | | | | | | * Change reinterpret_cast -> static_cast wherever possible * Remove more unnecessary `const_cast`s. reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
* Fix cUrlClient leak (#4125)peterbell102018-02-201-17/+20
| | | | | | | | Fixes #4040 * The TCP connection is now shutdown after OnBodyFinished * Any open connections are closed when cNetworkSingleton::Terminate() is called. * Removed ownership cycles in cUrlClientRequest * Added a check to the test to ensure there are no leaks.
* Deal with covered switches consistently (#4161)peterbell102018-02-051-4/+1
| | | | | | | * Fixes a number of "<function>: not all control paths return a value" warnings on MSVC. * Introduces the UNREACHABLE global macro and uses it instead of conditionally compiled switch defaults. * Move cNBTParseErrorCategory from FastNBT.h into FastNBT.cpp to prevent bad calls to message()
* Add the fmt library (#4065)peterbell102018-01-032-1/+2
| | | | | | | * Replaces AppendVPrintf with fmt::sprintf * fmt::ArgList now used as a type safe alternative to varargs. * Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu. * Adds FLOG functions to log with fmt's native formatting style.
* Removed UTF-8 BOM (#4033)Lukas Pioch2017-09-194-4/+4
|
* Fix switch warnings (#4013)peterbell102017-09-141-5/+0
| | | | | | | | | | | | | | | * Fix switch warnings * Fix a variety of -Wswitch and -Wswitch-enum warnings * Remove unneeded -Wno-error flags * Reorganise some eMonsterType switches * Alpha sort eMonsterType cases in WriteMobMetadata and in cNBTChunkSerializer::AddMonsterEntity * List all mob types in protocol 1.12 and NBTChunkSerializer * cStructGenTrees::GetNumTrees: remove switch default * cWSSAnvil::LoadOldMinecartFromNBT: Log unhandled minecart type
* Update mbedtls to 2.5.1 (#3964)peterbell102017-08-305-38/+41
| | | | | | | | | | | | | | | | | | | | | | * Renaming changes: * macro prefix "POLARSSL" -> "MBEDTLS" * functions now prefixed with "mbedtls_" * rename PolarSSL++ -> mbedTLS++ * rename polarssl submodule * Use mbedtls' AES-CFB8 implementation. * Add cSslConfig to wrap mbedtls_ssl_config * Update cTCPLink and cBlockingSslClientSocket to use cSslConfig * Use cSslConfig in cHTTPServer * Use cSslConfig for cMojangAPI::SecureRequest * CI Fixes * Set -fomit-frame-pointer on the right target
* Removed unneeded includes (#3902)Lukas Pioch2017-08-062-2/+0
|
* Removed unused forward declarations (#3888)Lukas Pioch2017-08-031-2/+0
|
* Removed double includes (#3885)Lukas Pioch2017-08-022-2/+0
|
* Remove smart pointer macrospeterbell102017-07-214-9/+9
|
* Clang 5.0 fixesLukas Pioch2017-05-212-2/+2
| | | | | - Added override keyword - Removed inherited member variables
* Refactored to put URL Encoding / Decoding in a single place. (#3491)Mattes D2016-12-251-2/+11
|
* Fixed type-casting-related warnings.Mattes D2016-08-241-1/+0
|
* HTTP: Fixed empty headers parsing.Mattes D2016-08-241-1/+8
|
* cUrlClient: Refactored callbacks to use UniquePtr.Mattes D2016-08-222-24/+25
|
* cTCPLink supports TLS out of the box.Mattes D2016-08-222-14/+88
|
* UrlClient: Basic HTTP implementation.Mattes D2016-08-224-1/+756
|
* WebAdmin: Report opened ports. (#3333)Mattes D2016-08-211-2/+16
|
* Fixed RasPi builds of unit tests.Mattes D2016-08-041-1/+3
| | | | | On RasPi with gcc 4.8.2, the asserts wouldn't compile when tests were enabled. Enforced the assumption that ASSERT code is generated only in Debug builds.
* CMake: Remove needless minimum version specifications.Mattes D2016-07-181-2/+0
|
* HTTP: Added missing HasAuth flag initialization.Mattes D2016-03-111-1/+2
|
* HTTP: Fixed header parsing.Mattes D2016-03-031-0/+1
|
* HTTP: Fixed typos and bad leftovers.Mattes D2016-03-013-3/+4
|
* Renamed HTTPResponse to HTTPOutgoingResponse.Mattes D2016-03-015-10/+9
|
* WebAdmin uses the new HTTP parser framework.Mattes D2016-03-0114-797/+521
|
* HTTP: Fixed response parser, unified API.Mattes D2016-03-014-16/+22
|
* Fixed HTTP parsing when in insecure mode.Mattes D2016-03-011-2/+6
| | | | | Parsing would ignore the size of data already buffered, resulting in bad_alloc exception. Fixes #2898.
* Renamed HTTPServer folder to HTTP.Mattes D2016-03-0125-0/+3962
It contains client code as well.