aboutsummaryrefslogtreecommitdiffstats
path: root/pacredir.c
AgeCommit message (Collapse)AuthorFilesLines
2024-01-01update copyright for 2024Gravatar Christian Hesse1-1/+1
2023-11-24drop the 'Cache-Control: no-cache' header in http response...Gravatar Christian Hesse1-1/+0
... as pacman upstream will never use it.
2023-11-24drop setting to ignore db files...Gravatar Christian Hesse1-13/+2
Using just `CacheServer` (with commented `Server`) in pacman configuration has the same effect.
2023-09-30update wording: server -> peerGravatar Christian Hesse1-8/+8
2023-01-03update copyright for 2023Gravatar Christian Hesse1-1/+1
2022-09-15use http header 'Cache-Control: no-cache' for soft failureGravatar Christian Hesse1-1/+1
This is standard header...
2022-03-29send extra http header on expected failureGravatar Christian Hesse1-0/+1
Indicate that this failure is expected and pacman should not log an error and not increase the server error count. Looks like pacman will not support this... 😢 Let's add it anyway, may be handy.
2022-01-03update copyright for 2022Gravatar Christian Hesse1-1/+1
2021-06-07simplify address handlingGravatar Christian Hesse1-1/+1
2021-06-07do not redirect if database file is too oldGravatar Christian Hesse1-2/+3
The Arch repositories see regular updates... Consider a database file older than 24 hours out-of-date and do not redirect.
2021-06-07get the db timestamp from http requestGravatar Christian Hesse1-14/+11
2021-01-01update copyright for 2021Gravatar Christian Hesse1-1/+1
2020-11-25clearly state the licenseGravatar Christian Hesse1-2/+13
2020-07-07fix build with libmicrohttpd 0.9.71Gravatar Christian Hesse1-1/+1
2020-02-08update copyright for 2020Gravatar Christian Hesse1-1/+1
2019-07-01use proper log message when ignoring database filesGravatar Christian Hesse1-3/+6
2019-07-01allow to ignore database filesGravatar Christian Hesse1-1/+11
2019-01-01update copyright for 2019Gravatar Christian Hesse1-1/+1
2018-07-05drop 'struct services'Gravatar Christian Hesse1-26/+24
Now that we have just one service this can be merged with 'struct hosts'.
2018-07-04use private bind mounts for pacserve, remove pacdbservesystemd-v233Gravatar Christian Hesse1-69/+21
We want just one service to serve database files and package archives. Private bind mounts make both available to pacserve. This alse removes some complexity in pacredir.
2018-01-02update copyright for 2018Gravatar Christian Hesse1-1/+1
2017-12-13enable TCP fastopen optionGravatar Christian Hesse1-1/+1
2017-11-28do not return EXIT_FAILURE but goto failGravatar Christian Hesse1-1/+1
2017-11-28fix memory corruption with libmicrohttpdGravatar Christian Hesse1-4/+3
We had a race where page was freed before the queue finished. Tell libmicrohttpd it has to free itself.
2017-11-28allow HEAD requestsGravatar Christian Hesse1-1/+1
2017-10-30set basename for proper html output in responseGravatar Christian Hesse1-1/+1
2017-10-20allow to specify uid and gid in config.hGravatar Christian Hesse1-1/+1
2017-10-19try to drop root privilegesGravatar Christian Hesse1-0/+8
2017-10-19implement simple counters for systemctl statusGravatar Christian Hesse1-0/+12
2017-05-13prepare for reproducible buildsGravatar Christian Hesse1-0/+2
2017-05-13update version stringsGravatar Christian Hesse1-3/+4
2017-05-02add configuration option for protocol (IPv4 vs. IPv6)Gravatar Christian Hesse1-2/+20
2017-05-02(re-)add support for IPv6Gravatar Christian Hesse1-26/+37
2017-04-29extra verbosity from configGravatar Christian Hesse1-0/+6
2017-04-29Do not rely on mDNS...Gravatar Christian Hesse1-22/+72
... but do resolve the addresses within pacredir. The biggest advantage is that we do no longer require nss-mdns, which tends to fool us in different ways. As requests are done by address rather than host name you can no longer use virtual hosts for pacserve and pacdbserve. But did anybody try that?
2017-01-14update copyright for 2017Gravatar Christian Hesse1-1/+1
2017-01-06notify systemd on stopGravatar Christian Hesse1-0/+5
2017-01-05no need to tell systemd the pidGravatar Christian Hesse1-1/+1
This is required only when the pid is different from what systemd executed itself.
2016-12-01Use systemd service manager notificationGravatar Christian Hesse1-0/+3
Notify systemd service manager when our initialization sequence completed.
2016-10-12calculate date/time string only when neededGravatar Christian Hesse1-5/+6
2016-10-12make more output depend on verbose (do not print by default)Gravatar Christian Hesse1-19/+37
2016-10-12always pass real port to add_host(), print to verbose outputGravatar Christian Hesse1-5/+8
2016-10-12print only if verboseGravatar Christian Hesse1-7/+10
2016-10-11differentiate between offline and badGravatar Christian Hesse1-1/+6
2016-10-11Be more verbose about badtime, simplify conditionGravatar Christian Hesse1-8/+12
2016-10-11add line breakGravatar Christian Hesse1-1/+2
2016-10-11throttle requestsGravatar Christian Hesse1-0/+4
2016-10-11add comment about ctime stuffGravatar Christian Hesse1-3/+6
2016-10-11print message to stdout, not stderrGravatar Christian Hesse1-1/+1
2016-10-11format conditionGravatar Christian Hesse1-2/+6
no functional change...
2016-10-11initialize struct timeval just onceGravatar Christian Hesse1-2/+3
2016-10-10remove extra line breakGravatar Christian Hesse1-1/+0
2016-10-10show the more generic information if errbuf is emptyGravatar Christian Hesse1-2/+3
2016-10-10verbose output: returned -> receivedGravatar Christian Hesse1-1/+1
2016-10-10set to error buffer emptyGravatar Christian Hesse1-0/+1
2016-10-10add printing curl error messagesGravatar Christian Hesse1-1/+5
2016-10-10verbose output: do not print useless messageGravatar Christian Hesse1-1/+1
There is no HTTP status code 0, so this is what we set earlier.
2016-10-10verbose output: error -> http status codeGravatar Christian Hesse1-1/+1
2016-10-06fix race condition with SIGHUPGravatar Christian Hesse1-2/+7
2016-01-30add more specific comment about db filesGravatar Christian Hesse1-1/+1
2016-01-30correctly handle *.files and redirect to pacdbserveGravatar Christian Hesse1-1/+2
2016-01-27darkhttpd supports IPv6 now, no longer limit to IPv4Gravatar Christian Hesse1-2/+2
2016-01-04update copyright for 2016Gravatar Christian Hesse1-1/+1
2015-12-12use MHD_create_response_from_buffer()Gravatar Christian Hesse1-2/+2
MHD_create_response_from_data() is deprecated, so use MHD_create_response_from_buffer() instead.
2015-12-12allow to limit the number of query threadsGravatar Christian Hesse1-1/+13
2015-07-03add --version optionGravatar Christian Hesse1-4/+18
2015-06-24fix string handlingGravatar Christian Hesse1-3/+10
iniparser_getstring() returns const char*, but strtok() modifies its first argument. So strdup() and free().
2015-01-04update copyright for 2015Gravatar Christian Hesse1-1/+1
2014-10-21use ISO C11 standard and move includes to header fileGravatar Christian Hesse1-30/+0
2014-10-06pacman should not ask for db signature filesGravatar Christian Hesse1-3/+2
2014-10-06fix guess the fastest server for db filesGravatar Christian Hesse1-2/+5
New db files were not fetched from upstream servers if one server had a file with same timestamp.
2014-10-05try to guess the fastest server for db files as wellGravatar Christian Hesse1-1/+2
2014-09-04reformat long functions0.1.10Gravatar Christian Hesse1-5/+20
2014-08-29do not use DEBUG macro but command line argument to be verboseGravatar Christian Hesse1-29/+45
2014-07-28have port in struct services, allow to specify host:port in pacredir.confGravatar Christian Hesse1-14/+27
2014-06-16clean whitespaceGravatar Christian Hesse1-1/+1
2014-06-16add debug output for file not foundGravatar Christian Hesse1-0/+4
2014-06-16be a bit less verboseGravatar Christian Hesse1-0/+2
2014-06-16print modification datprint modification dateGravatar Christian Hesse1-1/+5
2014-04-22use write_log() instead of printf()Gravatar Christian Hesse1-1/+1
2014-04-22fix filename in html pagesGravatar Christian Hesse1-2/+2
2014-04-22redirect to project website if no file is givenGravatar Christian Hesse1-0/+9
2014-04-22darkhttpd only serves IPv4, so limit curl to thatGravatar Christian Hesse1-1/+3
2014-01-20make output a bit more verboseGravatar Christian Hesse1-1/+6
2014-01-13try to guess the fastest server for packagesGravatar Christian Hesse1-2/+14
2014-01-03move arch specific macros to separate header fileGravatar Christian Hesse1-0/+1
2014-01-02write version to header fileGravatar Christian Hesse1-0/+1
2014-01-02update copyright yearGravatar Christian Hesse1-1/+1
2013-11-28clean up trailing white spacesGravatar Christian Hesse1-10/+10
2013-11-15rename services.bad to something more descriptiveGravatar Christian Hesse1-10/+10
2013-11-15reset badcount on SIGHUPGravatar Christian Hesse1-0/+2
2013-11-14count bad requests and increase ignore time after requestGravatar Christian Hesse1-7/+14
2013-11-14do a request as soon as host is up to check bad statusGravatar Christian Hesse1-4/+29
2013-11-14introduce pacredir.hGravatar Christian Hesse1-42/+2
2013-11-12print number of failed serversGravatar Christian Hesse1-1/+1
2013-11-07make pacredir multi-threaded, do all curl requests at onceGravatar Christian Hesse1-85/+130
2013-11-07add architecture to user agent stringGravatar Christian Hesse1-1/+1
2013-11-06clean up included headersGravatar Christian Hesse1-5/+3
2013-11-06give long to curl_easy_setopt()Gravatar Christian Hesse1-3/+3
2013-11-05do not handle client to browse_callbackGravatar Christian Hesse1-2/+2