Commit Graph

16 Commits (master)

Author SHA1 Message Date
ShadowNinja 29d2b2ccd0
Print announce error response (#11878)
Fix HTTPFetch caller and request ID to 64 bits
Check that allocated caller ID is not DISCARD
Print body if serverlist request returns error
Don't print control characters from HTTP responses
Document special HTTPFetch caller IDs
Allow unicode to be printed
2022-01-01 22:44:56 +01:00
Lejo 715a123a33
Add PUT and DELETE request + specific method value to HTTP API (#9909) 2020-07-29 23:16:21 +02:00
Loïc Blot 17016090e3 Travis: Update clang from 4.0 to 5.0 (#6467)
* Update clang from 4.0 to 5.0
2017-10-09 11:32:06 +02:00
Loic Blot 1d086aee7c
Modernize various files (part 2)
* range-based for loops
* emplace_back instead of push_back
* code style
* C++ headers instead of C headers
* Default operators
* empty stl function
2017-08-18 08:07:59 +02:00
Loïc Blot 921151d97a C++ modernize: Pragma once (#6264)
* Migrate cpp headers to pragma once
2017-08-17 22:19:39 +02:00
Loïc Blot 8f7785771b Cpp11 initializers 2 (#5999)
* C++11 patchset 10: continue cleanup on constructors

* Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop)

* More classes cleanup

* More classes cleanup + change NULL tests to boolean tests
2017-06-17 19:11:28 +02:00
Loic Blot dda171d292
LINT fix 2017-04-23 10:24:00 +02:00
Loïc Blot f98bbe193e Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)
* Also remove 2 non declared but defined functions
* Make some functions around const ref changes const
2017-04-20 00:12:52 +02:00
Jeija 31e0667a4a Add Lua interface to HTTPFetchRequest
This allows mods to perform both asynchronous and synchronous HTTP
requests. Mods are only granted access to HTTP APIs if either mod
security is disabled or if they are whitelisted in any of the
the secure.http_mods and secure.trusted_mods settings.

Adds httpfetch_caller_alloc_secure to generate random, non-predictable
caller IDs so that lua mods cannot spy on each others HTTP queries.
2016-02-22 15:39:41 +01:00
kwolekr da34a2b33e Replace instances of std::map<std::string, std::string> with StringMap
Also, clean up surrounding code style
Replace by-value parameter passing with const refs when possible
Fix post-increment of iterators
2015-05-19 16:10:49 -04:00
ShadowNinja 86a3c8ce56 Reduce indentation of HTTPFetchOngoing
Also clean up some related things.
2014-09-18 21:54:22 -04:00
ShadowNinja b2dfde8c8c Add support for multipart/form-data to HTTPFetch for server announcing 2014-06-30 13:23:09 -04:00
proller c62bab010f Send long announce as POST, show OS in useragent
Add lag reporting to masterserver (average dtime)
StyledWriter  -> FastWriter in masterserver announce
2014-01-07 02:50:45 +04:00
sapier 0d990bd189 Replace any direct curl usage by httpfetch 2013-12-13 18:05:46 +01:00
Kahrl b03135548b Use httpfetch_async in serverlist announce code 2013-12-13 18:05:39 +01:00
Kahrl 0ea3e6dbe2 Implement httpfetch module and initialize it from main()
Add curl_parallel_limit setting that will replace media_fetch_threads in
a later commit.

Fix a typo in MutexedQueue::pop_back() that made it impossible to compile
code that used this function. (Noticed this while implementing httpfetch.)
2013-12-13 18:05:10 +01:00