summaryrefslogtreecommitdiffstats
path: root/src/HTTP (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-05-19cTCPLink and cUrlClient accept list of trusted root CAs for TLS.Mattes D2-40/+74
2023-05-19cTCPLink: Use the original connection hostname for SNI.Mattes D1-1/+1
2023-05-19Auth SSL Fixesx12xx12x4-23/+172
- Fixed Login Breaking bug - Auth and MojangAPI now use UrlClient - fixed bug in UrlClient where one letter was missing in the HTTP Header - added function to verify Urls from config files and error handling on bad Urls in config for Auth
2023-05-16Removed all Printf-family functions from StringUtils.Mattes D5-25/+25
Replaced them with fmt::format calls, including changes to the format strings. Also changed the format strings to use FMT_STRING, so that the format is checked compile-time against the arguments. Also fixed code-style violations already present in the code.
2020-11-14HTTPServerConnection: more robust error handlingTiger Wang1-21/+18
* Fix passing a nullptr to downstream code when the request was malformed + Reset the connection on errors * Fixes #5029
2020-05-16Upgrade to C++17 [CMake] (#4717)Tiger Wang1-8/+2
* Make our CMake slightly less insane
2020-05-15Enable some more clang-tidy linter checks (#4738)peterbell106-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
2020-04-16Using Super.Mattes D6-13/+22
2018-08-29Force all headers other than "Globals.h" to be included with relative paths (#4269)peterbell104-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.
2018-07-26CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell105-4/+2
Add check for number of empty lines between functions and fix the corresponding failures
2018-05-02Prefer static_cast to reinterpret_cast (#4223)peterbell102-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.
2018-02-20Fix cUrlClient leak (#4125)peterbell101-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.
2018-02-05Deal with covered switches consistently (#4161)peterbell101-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()
2018-01-03Add the fmt library (#4065)peterbell102-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.
2017-09-19Removed UTF-8 BOM (#4033)Lukas Pioch4-4/+4
2017-09-14Fix switch warnings (#4013)peterbell101-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
2017-08-30Update mbedtls to 2.5.1 (#3964)peterbell105-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
2017-08-06Removed unneeded includes (#3902)Lukas Pioch2-2/+0
2017-08-03Removed unused forward declarations (#3888)Lukas Pioch1-2/+0
2017-08-02Removed double includes (#3885)Lukas Pioch2-2/+0
2017-07-21Remove smart pointer macrospeterbell104-9/+9
2017-05-21Clang 5.0 fixesLukas Pioch2-2/+2
- Added override keyword - Removed inherited member variables
2016-12-25Refactored to put URL Encoding / Decoding in a single place. (#3491)Mattes D1-2/+11
2016-08-24Fixed type-casting-related warnings.Mattes D1-1/+0
2016-08-24HTTP: Fixed empty headers parsing.Mattes D1-1/+8
2016-08-22cUrlClient: Refactored callbacks to use UniquePtr.Mattes D2-24/+25
2016-08-22cTCPLink supports TLS out of the box.Mattes D2-14/+88
2016-08-22UrlClient: Basic HTTP implementation.Mattes D4-1/+756
2016-08-21WebAdmin: Report opened ports. (#3333)Mattes D1-2/+16
2016-08-04Fixed RasPi builds of unit tests.Mattes D1-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.
2016-07-18CMake: Remove needless minimum version specifications.Mattes D1-2/+0
2016-03-11HTTP: Added missing HasAuth flag initialization.Mattes D1-1/+2
2016-03-03HTTP: Fixed header parsing.Mattes D1-0/+1
2016-03-01HTTP: Fixed typos and bad leftovers.Mattes D3-3/+4
2016-03-01Renamed HTTPResponse to HTTPOutgoingResponse.Mattes D5-10/+9
2016-03-01WebAdmin uses the new HTTP parser framework.Mattes D14-797/+521
2016-03-01HTTP: Fixed response parser, unified API.Mattes D4-16/+22
2016-03-01Fixed HTTP parsing when in insecure mode.Mattes D1-2/+6
Parsing would ignore the size of data already buffered, resulting in bad_alloc exception. Fixes #2898.
2016-03-01Renamed HTTPServer folder to HTTP.Mattes D25-0/+3962
It contains client code as well.