2025-01-13  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.16


2025-01-13  Sergey Poznyakoff  <gray@gnu.org>

        Minor improvement to the previous commit

        * src/pound.h (BACKEND) [ENABLE_DYNAMIC_BACKENDS]: Move refcount 
        under conditional.
        (backend_refcount_init): New function
        * src/config.c (backend_create, backend_resolve): Use 
        backend_refcount_init, instead of directly assigning to
        refcount.

2025-01-12  Sergey Poznyakoff  <gray@gnu.org>

        Fix backend probing with dynamic backends turned off.

        * src/pound.h [ENABLE_DYNAMIC_BACKENDS] (backend_referenced) New
        function.
        [!ENABLE_DYNAMIC_BACKENDS] (backend_referenced) New macro,
        evaluating to 1.
        * src/svc.c (touch_be): Use backend_referenced instead of
        comparing refcount in place.

2025-01-02  Sergey Poznyakoff  <gray@gnu.org>

        Update copyleft statements


2025-01-02  GitHub  <gray@gnu.org>

        Merge pull request #43 from
        JeppW/client-error-on-oversized-chunk

        Reject requests with oversized chunk bodies
2024-12-31  Jeppe Weikop  <jweiko21@student.aau.dk>

        reject requests with oversized chunk bodies


2024-11-25  Sergey Poznyakoff  <gray@gnu.org>

        Minor improvement (testsuite)

        * tests/Makefile.am: Ad package.m4 to MAINTAINERCLEANFILES.

2024-11-16  Sergey Poznyakoff  <gray@gnu.org>

        Test ACL and named ACL functionality

        * tests/Makefile.am: Add new tests.
        * tests/testsuite.at: Include new tests.
        * tests/acl.at: New test.
        * tests/nacl.at: New test.
        * tests/poundharness.pl: New option: --source-address. New
        script statement: source.

2024-11-15  Sergey Poznyakoff  <gray@gnu.org>

        Add test for BasicAuth conditional


2024-11-15  Sergey Poznyakoff  <gray@gnu.org>

        Don't apply rewrites if condition cannot be evaluated due to
        errors.

        * src/http.c (match_cond): Propagate error return.
        (rewrite_rule_check): Apply rewrites only if match_cond returns
        1.
        (http_request_get_basic_auth): Return 0 or 1 on normal
        operation, and
        -1 on error.
        * src/svc.c (match_service): Return true only if match_cond
        returns 1.

2024-11-17  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.15


2024-11-08  Sergey Poznyakoff  <gray@gnu.org>

        Minor change in poundharness.pl


2024-10-31  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.14.91


2024-10-31  Sergey Poznyakoff  <gray@gnu.org>

        poundharness: minor fixes

        * tests/poundharness.pl (%status_codes): Mark as shared.
        (read_and_process): exit if accept fails

2024-10-30  Sergey Poznyakoff  <gray@gnu.org>

        Fix typo


2024-10-30  Sergey Poznyakoff  <gray@gnu.org>

        New configuration statement: OverrideTTL

        Make sure a dynamic backend remains referenced for as long as
        there is an update job for it in the queue.

        * src/pound.h (be_matrix): New field: override_ttl.
        (backend_create): New proto.
        * src/config.c (backend_create,xbackend_create): New function. 
        Initialize backend mutex using mutex_attr_recursive.
        (backend_parsetab): New statement: OverrideTTL.
        (parse_backend_internal,parse_backend)
        (parse_use_backend,parse_control_backend)
        (parse_metrics,parse_redirect_backend)
        (parse_error_backend,parse_acme)
        (parse_control_listener): Use xbackend_create.
        * src/dynbe.c: Increment reference counter of a backend before
        scheduling a resolver job for it.  Decrement the counter before
        leaving the job (no matter whether it was run or cancelled).
        (BACKEND_hash,BACKEND_cmp): For matrix backends, use both
        hostname and port number.
        (backend_table_hostname_lookup): Take port number as argument.
        (service_matrix_addr_update_backends): Use backend_create to
        create and initialize the backend.
        (service_matrix_srv_update_backends): Likewise.
        (backend_ref,backend_unref): Apply to all backend types.
        (backend_matrix_srv_update,backend_matrix_addr_update): Override
        response expiration time, if v.mtx.override_ttl is set.

        * tests/dyn_a_ttl.at: New test.
        * tests/dyn_srv_ttl.at: New test.
        * tests/Makefile.am: Add new tests.
        * tests/testsuite.at: Likewise.

        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * doc/pound.texi: Likewise.

2024-10-30  Sergey Poznyakoff  <gray@gnu.org>

        poundharness.pl: Avoid spurious warning

        * tests/poundharness.pl (sigchild): Avoid the "use of
        uninitialized value" warning.
        (transcript, transcript_ml)
        (transcript_ok, transcript_fail): New methods. Use them instead
        of printing to {xscript} handle explicitly.

2024-10-29  Sergey Poznyakoff  <gray@gnu.org>

        Improve testsuite

        * tests/poundharness.pl: Exit immediately if an error is
        reported (via confess, croak, etc.) in parse_req or below. New
        statement: echo

2024-10-29  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix

        * src/svc.c (backend_serialize): Fix addressing wrong union
        field.

2024-10-29  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.14.90


2024-10-25  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix

        * tests/poundharness.pl (parse_control_backends): Use canonical
        output when printing expectation mismatch.

2024-10-25  Sergey Poznyakoff  <gray@gnu.org>

        New configuration statement: IgnoreSRVWeight

        Instructs pound to ignore weight value of an SRV record when
        generating new backend from it.  The priority of the generated
        backend is copied from its matrix backend.

        * src/pound.h (be_matrix): New field: ignore_srv_weight.
        * src/config.c (backend_parsetab): Handle IgnoreSRVWeight
        keyword.
        * src/dynbe.c (service_matrix_srv_update_backends): Ignore
        weight if v.mtx.ignore_srv_weight is set.

        * tests/Makefile.am: Add new test.
        * tests/dyn_srv_0.at: New test.
        * tests/testsuite.at: Include new test.

        * doc/pound.8: Document changes.
        * doc/pound.texi: Document changes.

2024-10-25  Sergey Poznyakoff  <gray@gnu.org>

        Fix typo in ChangeLog


2024-10-24  Sergey Poznyakoff  <gray@gnu.org>

        Improve iwrr load balancing.  Translate 0 SRV weights

        * doc/pound.8: Improve documentation of balancing strategies.
        * doc/pound.texi: Improve documentation of balancing strategies. 
        Document handling of SRV records with weight 0.
        * src/config.c (backend_assign_priority): Allow only positive
        numbers.
        (cb_be_setup): Use fixed priority limit for both balancing
        strategies.
        * src/dynbe.c: Don't interpolate SRV weight value.  Assign it
        verbatim instead.
        (analyze_srv_response): Don't check for overflow here.
        (service_matrix_srv_update_backends): Translate 0 priority, if
        necessary.
        * src/pound.h (balancer_list_get): Change prototype. All uses
        changed.
        * src/svc.c (iwrr_select): Fix condition.
        (balancer_list_get): Get balancing algorithm to use as argument.
        * tests/prio.at: Rewrite.

2024-10-24  Sergey Poznyakoff  <gray@gnu.org>

        New function backend_is_active

        It checks whether the backend is alive and not disabled.

2024-10-24  Sergey Poznyakoff  <gray@gnu.org>

        Clean up load balancing code.

        * src/config.c (cb_be_setup): Remove overflow checking.  It is
        done by each particular balancer.
        * src/dynbe.c (compute_priority): Fix data type of total_weight.
        * src/pound.h (BALANCER): New fields: type, iwrr, rand.  Remove 
        tot_pri and max_pri.  These two are algorithm-specific and are 
        included in rand and iwrr, correspondingly.
        (SERVICE): Rename backends field to balancers, to avoid
        confusion. All uses changed.
        * src/svc.c: Fully separate balancing implementations.

2024-10-23  Sergey Poznyakoff  <gray@gnu.org>

        poundharness.pl: self-test if --fakedns is given.

        * doc/pound.8: Update docs.
        * tests/getsoa.c: New file.
        * tests/.gitignore: Add getsoa.
        * tests/Makefile.am: Build getsoa.
        * tests/poundharness.pl: If --fakedns is requested, run a
        self-test using getsoa.  Exit with code 77 if it fails.
        * tests/perllib/PoundNS.pm: Fix a typo in comment.

2024-10-23  Sergey Poznyakoff  <gray@gnu.org>

        Fix initial computation of max and total priorities per balancer

        * doc/pound.8: Fix documentation of the allowed range for
        Priority.
        * src/config.c (parse_service): Don't compute sum of priorities
        here: this has to be done when all backends have been resolved,
        that is when entire configuration file has been scanned.  Move
        this to the end of parse_config_file.  Use
        balancer_recompute_pri_unlocked to compute max and total
        priorities.
        * src/pound.h (BALANCER): New field: act_num.  Holds the number
        of active backends in the balancer.
        * src/svc.c (service_has_backends): Use act_num to decide.
        (balancer_recompute_pri_unlocked): Compute also act_num.
        (touch_be): Update act_num.

2024-10-23  Sergey Poznyakoff  <gray@gnu.org>

        Fix access to freed memory

        * src/svc.c (service_session_add): Unlink old session from the
        list prior to freeing it, in case of duplicate sessions.
        (find_backend_by_key): Don't register session if backend was not 
        selected.

2024-10-22  Sergey Poznyakoff  <gray@gnu.org>

        Disable DNS-based tests by default.

        * configure.ac: New option: --enable-dns-tests
        * tests/Makefile.am: Build libfakedns only if COND_BUILD_FAKEDNS
        is true (i.e., --enable-dns-tests was given).
        * .github/workflows/testsuite.yml: Use --enable-dns-tests for 
        dynamic backend job.

2024-10-15  Sergey Poznyakoff  <gray@gnu.org>

        Skip tests if JSON perl module is not available


2024-10-13  Sergey Poznyakoff  <gray@gnu.org>

        Fix texinfo doc sectioning for HTML output.


2024-10-13  Sergey Poznyakoff  <gray@gnu.org>

        Spelling fixes


2024-10-13  Sergey Poznyakoff  <gray@gnu.org>

        Fix typo


2024-10-13  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.14


2024-10-13  Sergey Poznyakoff  <gray@gnu.org>

        Update README


2024-10-12  Sergey Poznyakoff  <gray@gnu.org>

        poundharness.pl: remove $SIG{__DIE__} handler

        The handler (introduced by 6b339a980e) broke HTTPS tests when 
        using IO::Socket::SSL 2.081 and newer.

2024-10-12  Sergey Poznyakoff  <gray@gnu.org>

        configure.ac: add missing test


2024-10-10  Sergey Poznyakoff  <gray@gnu.org>

        Add missing printflike attributes


2024-10-06  Sergey Poznyakoff  <gray@gnu.org>

        Finalize listener structures when opening their sockets in main.

        In particular, this makes Address and Port statements (in 
        ListenHTTP(S)) optional.  Missing Address means all available IP
        addresses (both ip and ipv6), and missing Port implies the 
        default port number for the listener.

        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * doc/pound.texi: Likewise.
        * src/config.c: Assign listener address and port to the
        temporary storage fields addr_str and port_str.  Don't handle
        SocketFrom statements right away. Resolve addresses and ports
        after all listener configuration has been collected.  Prefer
        in6addr_any address over INADDR_ANY, as the former includes the
        latter.
        * src/pound.c (main): Finalize handling of SocketFrom statements
        here.
        * src/pound.h (PORT_HTTP_STR, PORT_HTTPS_STR): New defines.
        (LISTENER): New fields: addr_str, port_str, socket_from.
        * src/svc.c (get_host): Remove unnecessary code.

2024-10-05  Sergey Poznyakoff  <gray@gnu.org>

        Bugfixes.

        * src/config.c (parse_acme, parse_control_listener): Initialize
        be->service.    * src/svc.c (LOCATE): New macro.
        (locate_listener, locate_service): Fix the lookup.
        (listener_is_control): Remove.
        (service_has_control, listener_has_control): New functions.
        (disable_handler): Fix checking whether the object is allowed
        for disabling.

2024-10-05  Sergey Poznyakoff  <gray@gnu.org>

        Minor change


2024-10-04  Sergey Poznyakoff  <gray@gnu.org>

        bootstrap: create m4


2024-10-04  Sergey Poznyakoff  <gray@gnu.org>

        Minor fixes in poundctl


2024-10-04  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.13.91


2024-10-04  Sergey Poznyakoff  <gray@gnu.org>

        New request matching conditional: ClientCert.

        * src/pound.h (COND_CLIENT_CERT): New constant.
        (SERVICE_COND): New field: x509.
        (filename_resolve): New proto.
        * src/cfgparser.c (filename_resolve): New function.
        * src/config.c (assign_cert): New function.
        (backend_parse_cert, https_parse_cert): Resolve certificate 
        names relative to the include directory. New request matching
        conditional: ClientCert.
        * src/http.c (match_cond): Handle ClientCert conditional.
        (do_http): Fix memory leak.

        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * doc/pound.texi: Likewise.

2024-10-03  Sergey Poznyakoff  <gray@gnu.org>

        Add missing copyleft statements


2024-10-03  Sergey Poznyakoff  <gray@gnu.org>

        Update NEWS


2024-10-03  Sergey Poznyakoff  <gray@gnu.org>

        Fixes in the documentation

        * doc/pound.texi: Add explicit menus.
        * doc/webdoc.init: Fix for texinfo version 6.8

2024-10-03  Sergey Poznyakoff  <gray@gnu.org>

        Implement poundctl configuration file

        * doc/pound.texi: Document changes.
        * doc/poundctl.8: Likewise.
        * src/cfgparser.c (cfgparser_open)
        (cfgparser_parse): Supply working directory as an additional
        argument.
        * src/cfgparser.h: Change prototypes accordingly.
        * src/poundctl.c: Introduce configuration file.  New option: -S
        * tests/atlocal.in: Set POUNDCTL_CONF to an empty value.
        * tests/poundharness.pl: Likewise.

2024-10-02  Sergey Poznyakoff  <gray@gnu.org>

        Move general-purpose configuration parser to a separate file.


2024-10-01  Sergey Poznyakoff  <gray@gnu.org>

        New keyword available in Service section: Control.

        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * doc/poundctl.8: Likewise.
        * doc/pound.texi: Likewise.
        * src/config.c: New keyword available in Service section:
        Control.
        * src/http.c (control_response): A wrapper over
        control_response_basic that runs request rewriting prior to
        calling it.
        * src/pound.h (control_response): Rename to
        control_response_basic.
        * src/svc.c: Likewise.
        * src/poundctl.c: The -s option accepts a URL as its argument. 
        Implement plain HTTP, HTTPS and basic auth. New options:
         -C CAFILE   load CA certificates from file or directory
         -K CERT     load client certificate for peer authentication.
         -k          disable peer verification.

2024-10-01  Sergey Poznyakoff  <gray@gnu.org>

        Merge branch 'resolver'


2024-10-01  Sergey Poznyakoff  <gray@gnu.org>

        Update NEWS


2024-09-30  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.13.90


2024-09-30  Sergey Poznyakoff  <gray@gnu.org>

        Minor changes


2024-09-30  Sergey Poznyakoff  <gray@gnu.org>

        Require version 1990 of Net::DNS::Nameserver.


2024-09-30  Sergey Poznyakoff  <gray@gnu.org>

        Check version of Net::DNS::Nameserver


2024-09-30  Sergey Poznyakoff  <gray@gnu.org>

        Try libnet-dns-perl in github workflows.


2024-09-30  Sergey Poznyakoff  <gray@gnu.org>

        Automatically determine port numbers to use in test DNS server.

        * tests/perllib/PoundNS.pm: New file.
        * tests/poundharness.pl: Use PoundNS.
        * tests/Makefile.am: Add perllib/PoundNS.pm to distribution.
        * tests/atlocal.in: Set PERL5LIB.
        * tests/dyn_a.at: Change timeouts.
        * tests/fakedns.c: Use separate ports for UDP and TCP
        connections.

2024-09-30  Sergey Poznyakoff  <gray@gnu.org>

        Changes in the testsuite

        * tests/poundharness.pl: Insert "Control" statement at the 
        beginning of pound.cfg Remove "control" wrapper statement.
        * tests/disable.at: Remove "Control" statement.
        * tests/list.at: Likewise.
        * tests/sessctl.at: Likewise.
        * tests/dyn_a.at: Add keywords.
        * tests/dyn_srv.at: Likewise.
        * tests/incldir.at: Use PT_CHECK.
        * tests/inclnest.at: Likewise.
        * tests/inclscope.at: Likewise.
        * tests/include.at: Likewise.

2024-09-30  Sergey Poznyakoff  <gray@gnu.org>

        Test A-based dynamic backends

        * tests/poundharness.pl (cleanup): Stop nameserver if necessary. 
        Install $SIG{__DIE__}.
        * tests/dyn_a.at: New test.
        * tests/srv.at: rename to tests/dyn_srv.at
        * tests/Makefile.am: Add new test.
        * tests/testsuite.at: Likewise.

2024-09-30  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix

        * src/config.c (backend_finalize): Convert default port setting
        to network order.

2024-09-30  Sergey Poznyakoff  <gray@gnu.org>

        Add missing file


2024-09-29  Sergey Poznyakoff  <gray@gnu.org>

        Provide a framework for testing dynamic backends

        * .gitignore: Update.
        * Makefile.am (ACLOCAL_AMFLAGS): Use -I m4
        * configure.ac: Use libtool.  Place its files in m4.
        (COND_RESOLVER): Rename to COND_DYNAMIC_BACKENDS. All uses
        changed.
        * tests/.gitignore: Update.
        * tests/Makefile.am: Add srv.at.
        [COND_DYNAMIC_BACKENDS]: Build libfakedns.la.
        * tests/atlocal.in [COND_DYNAMIC_BACKENDS]: Define
        DYNAMIC_BACKENDS.
        (LIBFAKEDNS): New variable.
        * tests/fakedns.c: New file.
        * tests/poundharness.pl: New option: --fakedns Use
        Net::DNS::Nameserver if given the --fakedns option.
        (preproc): Add the Resolver section if --fakedns is given. 
        Change handling of the Backend and Emergency sections. The
        Address and Port statements within them are optional.  Unless 
        the Resolve directive is given (it must be the first directive
        in section), the correct Address and Port statements are emitted
        at the beginning of section.
        (runner): Don't use -Wno-dns if --fakedns is given.
        (parse_req): New statements: mkbackend, sleep, zonefile,
        control.
        * tests/testsuite.at (PT_PREREQ_DYNAMIC_BACKENDS)
        (PT_PREREQ_FAKEDNS): New macros. Include srv.at

        * doc/poundctl.tmpl.5: Remove mentions of tot_pri and abs_pri.

2024-09-28  Sergey Poznyakoff  <gray@gnu.org>

        Bugfixes

        * src/config.c (backend_finalize): Remove initialization of
        betab: it is now done by backend_matrix_init.
        * src/dynbe.c (backend_matrix_addr_init): Rename to 
        backend_matrix_addr_update; remove the locked parameter. All
        uses updated.
        (backend_matrix_srv_init): Rename to backend_matrix_srv_update. 
        All uses updated.
        (backend_matrix_init): Remove to backend_matrix_update.  All
        uses updated.
        (backend_matrix_schedule_update): New function.
        (service_matrix_addr_update_backends): Remove the "locked"
        parameter. Call balancer_list_get when service is locked. 
        Schedule updating of the subordinate matrices, instead of doing
        so synchronously: don't do lengthy DNS operations while the
        mutex is locked.
        (backend_matrix_init): New function.
        * src/pound.h: Remove unnecessary prototypes.

2024-09-27  Sergey Poznyakoff  <gray@gnu.org>

        Improve error handling

        * src/dynbe.c (service_matrix_srv_update_backends): Handle error 
        return from analyze_srv_response graciously.

2024-09-27  Sergey Poznyakoff  <gray@gnu.org>

        Don't change ownership of the installed files


2024-09-27  Sergey Poznyakoff  <gray@gnu.org>

        Split resolver.c into two files: resolver.c and dynbe.c


2024-09-27  Sergey Poznyakoff  <gray@gnu.org>

        Document dynamic backends


2024-09-27  Sergey Poznyakoff  <gray@gnu.org>

        Don't use max_pri/tot_pri to decide whether balancer has working
        backends

        * src/svc.c (balancer_select_backend)
        (service_has_backends): Check whether backend list is empty,
        instead.

2024-09-26  Sergey Poznyakoff  <gray@gnu.org>

        Reverse minimum requirement for priority


2024-09-26  Sergey Poznyakoff  <gray@gnu.org>

        Bugfixes

        * src/config.c (assign_int_range): Fix diagnostics.
        (backend_assign_priority): Priority cannot be 0.
        * src/resolver.c (compute_priority): Make sure returned value is
        not 0.
        * src/svc.c (thr_timer): Run each job in a separate thread to
        prevent deadlocks.
        (expire_sessions, do_RSAgen): Use locking version of
        job_enqueue* functions.
        (cb_backend_disable): Increase backend reference counter.
        (touch_be): Do nothing if reference counter is 1 (backend is not
        used by anyone else). Decrement backend reference counter before
        exiting.
        (locate_service): Fix condition.

2024-09-25  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix


2024-09-25  Sergey Poznyakoff  <gray@gnu.org>

        Rewrite backend removal logic.

        Instead of removing each backend in a separate thread, fire a
        single thread and hand it over a list of backends waiting for
        removal.  The thread removes backends whose reference counters
        reach zero and waits for those that are still in use to be
        released.  The backend_unref function signals the thread each
        time a backend becomes unreferenced.

        * src/config.c (new_service): New function.
        (parse_service, parse_acme, parse_control): Use it to allocate
        service objects.
        * src/extern.h (mutex_attr_recursive)
        (thread_attr_detached): New externs.
        * src/pound.c (mutex_attr_recursive, thread_attr_detached): New
        globals.
        (attr): Rename to thread_attr_worker. All uses changed.
        (main): Initialize new globals.
        * src/pound.h (SERVICE): New fields: be_rem_head and
        be_rem_cond.
        * src/resolver.c (backend_sweep): Remove any sessions associated
        with the backend, remove it from the balancer, and append it to
        the list of backends scheduled for removal. Start removal thread
        if the latter is not empty.
        (thr_backend_remover): Rewrite.
        (backend_unref): Signal the removal thread if the backend's
        reference counter reaches zero.

2024-09-24  Sergey Poznyakoff  <gray@gnu.org>

        New configuration statement: ConfigText (Resolver section).

        * NEWS: Document changes.
        * src/config.c (ConfigFile): Use assign_string_from_file to
        handle it.
        (ConfigText): New statement.
        * src/resolver.c (slurp_file): Remove.
        (dns_state_create): Use configuration statements from
        conf.config_text.
        * src/resolver.h (resolver_config): Remove config_file. New
        field: config_text.

2024-09-24  Sergey Poznyakoff  <gray@gnu.org>

        Minor changes to finish the cleanup


2024-09-24  Sergey Poznyakoff  <gray@gnu.org>

        Major terminology cleanup

        s/BALANCER/BALANCER_ALGO/g s/BACKEND_LIST/BALANCER/g 
        s/BACKEND_META_LIST/BALANCER_LIST/g 
        s/balancer_add/balancer_add_backend/g 
        s/balancer_remove/balancer_remove_backend/g and 
        s/master/parent/g

2024-09-23  Sergey Poznyakoff  <gray@gnu.org>

        Bugfixes

        * doc/metrics.texi: Remove pound_service_pri.
        * src/metrics.c: Likewise.
        * src/pound.h (service_lb_reset): New proto.
        * src/resolver.c (backend_sweep): Call service_lb_reset.
        * src/svc.c (iwrr_select): Initialize balancer if necessary.

2024-09-22  Sergey Poznyakoff  <gray@gnu.org>

        Symbolic representation of resolve type in poundctl output


2024-09-22  Sergey Poznyakoff  <gray@gnu.org>

        Include dynamic generation info to the default poundctl output.
        Minor fixes.

        * src/pound.h (job_get_timestamp): New proto.
        (be_matrix, be_regular): New field: master.
        * src/poundctl.tmpl: Print dynamic generation status, if
        applicable: index of the producer matrix backend for dynamically
        generated backends, and expiration time for matrices.
        * src/resolver.c (service_matrix_addr_update_backends)
        (service_matrix_srv_update_backends): Save master pointer.
        (backend_matrix_disable): Cancel pending periodic job.
        * src/svc.c (job_get_timestamp): New function.
        (find_backend_index,backend_serialize_dyninfo): New functions.
        (backend_serialize): Add dynamic generation info when available.

2024-09-22  Sergey Poznyakoff  <gray@gnu.org>

        Minor improvements.

        * src/resolver.c (service_matrix_addr_update_backends):
        Recompute priorities only within the affected backend list.
        (service_matrix_srv_update_backends): Use
        service_recompute_pri_unlocked.

2024-09-21  Sergey Poznyakoff  <gray@gnu.org>

        Fix handling the not_found DNS response.


2024-09-21  Sergey Poznyakoff  <gray@gnu.org>

        Accept all backend statements in an Emergency section.  Update
        the docs.

        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * doc/pound.texi: Likewise.
        * src/config.c (emergency_parsetab): Remove.
        (parse_emergency): Use backend_parsetab instead of
        emergency_parsetab.

2024-09-21  Sergey Poznyakoff  <gray@gnu.org>

        Major rewrite in backend storage and selection system.

        This commit introduces a "backend meta list", i.e. a list of 
        backend lists.  Each backend list contains all information
        necessary for balancing and is assigned an integer weight. 
        Backend lists are ordered by their weights.  When selecting a
        backend, all backends with the same weight are tried first. 
        Only if none can be reached, next list if any is tried.

        Instead of having a list of regular backend and optional single
        emergency backend in each service, a backend meta list is
        associated with it. Emergency backends (there may be multiple)
        are allocated in the backend list with the highest weight
        (65535).  Normal backends are allocated in backend list with
        zero weight.

        Dynamic SRV-based backends map well into this structure.  Due to
        historic reasons, SRV priority field is mapped to the backend
        list *weight*, and SRV weight field is mapped to the backend
        *priority*.

        * src/pound.h (be_matrix): New field: weight.
        (BACKEND): New field: be_list.
        (BACKEND_LIST, BACKEND_META_LIST): New data types.
        (SERVICE): Remove emergency, tot_pri, max_pri, iwrr_round,
        iwrr_cur. Change type of backends.
        (backend_list_add, backend_list_remove): New functions.
        (backend_meta_list_get): New proto.
        (backend_meta_list_alloc): New proto.
        (backend_meta_list_get_normal)
        (backend_meta_list_get_emerg): New functions.
        * src/config.c (parse_backend, parse_use_backend)
        (parse_redirect_backend, parse_error_backend): Assume
        BACKEND_META_LIST passed as call_data. Use backend_list_add and
        backend_meta_list_get_normal, to get the list to add the backend
        to.
        (parse_emergency): Use backend_list_add and
        backend_meta_list_get_emerg, to get the list to add the backend
        to.
        (parse_acme): Use backend_list_add and
        backend_meta_list_get_normal, to get the list to add the backend
        to.
        (parse_service): Update.
        * src/poundctl.tmpl: Print list weight for the backends. Don't
        print tot_pri (removed now).
        * src/resolver.c (service_matrix_addr_update_backends)
        (service_matrix_srv_update_backends,thr_backend_remover):
        Reflect changes.
        * src/svc.c (rand_backend, iwrr_select): Take BACKEND_LIST as
        argument.
        (backend_list_lb_select, backend_list_lb_init): New functions.
        (get_backend): Reflect data structure changes.
        (backend_list_recompute_pri_unlocked): New function.
        (service_recompute_pri_unlocked): Rewrite.
        (service_recompute_pri): Rewrite.
        (kill_be, touch_be, session_backend_index)
        (backends_serialize, locate_backend)
        (listener_is_control,itr_service_backends): Reflect data
        structure changes.
        (backend_serialize): New attribute: "weight".
        (service_serialize): Remove tot_pri and max_pri attributes.
        (backend_meta_list_get,backend_meta_list_remove): New function.
        * tests/list.at: Update.
        * tests/sessctl.at: Update.

2024-09-21  Sergey Poznyakoff  <gray@gnu.org>

        Check backend priorities for consistency.

        * src/pound.h (SERVICE): Change type of tot_pri to unsigned
        long.
        (TOT_PRI_MAX): New define.
        * src/config.c (assign_int_range): Don't check an extremum if it
        is 0.
        (backend_assign_priority): Check for non-negative values only. 
        Upper limit depends on the balancing algorithm used, and will be
        checked later when this info is available.
        (parse_service): Check if priority of each backend is below
        maximum. Check for tot_pri overflows.
        * src/resolver.c (backend_ref): Do nothing if argument is NULL.
        * doc/pound.texi: Change max. allowed value for backend priority
        for iwrr balancing algorithm.

2024-09-19  Sergey Poznyakoff  <gray@gnu.org>

        Move dynamic backend specific functions to resolve.c


2024-09-19  Sergey Poznyakoff  <gray@gnu.org>

        Minor change


2024-09-19  Sergey Poznyakoff  <gray@gnu.org>

        Minor change.


2024-09-19  Sergey Poznyakoff  <gray@gnu.org>

        Initial support for SRV dynamic backends.

        * src/config.c (assign_resolve_mode): New mode: srv.
        * src/pound.h (JOB_ID): New datatype.
        (JOB_FUNC): Change signature; job_ctl is passed as first
        argument.
        (job_enqueue): Return JOB_ID of the new job.
        (job_cancel): New proto.
        (be_matrix): New field: jid.
        (backend_table_free): New proto.
        * src/resolver.c (dns_generic_lookup): Fix response type.
        (backend_table_free): New function.
        (BACKEND_TABLE): Hash backend address or hostname, depending on
        the type of backends stored.
        (service_matrix_update_backends): Rename to
        service_matrix_addr_update_backends, with edits.
        (service_matrix_srv_update_backends): New function.
        (backend_matrix_init): Handle bres_srv resolve mode.
        * src/svc.c (JOB): New field: id.
        (struct jobcancel, JOBCNCL_HEAD): New types.
        (jobcncl_head, job_next_id): New variables.
        (job_arm_unlocked): Assign current JOB ID to the id field of the
        newly created job and increment it. Return allocated id.
        (job_enqueue_unlocked, job_enqueue_after_unlocked)
        (job_enqueue): Return job ID.
        (job_remove, job_cancel): New functions.
        (thr_timer): Process job removal queue prior to waiting for next 
        scheduled timestamp.

2024-09-19  Sergey Poznyakoff  <gray@gnu.org>

        Initial implementation of SRV lookups.

        * src/resolver.c (dns_response_free): Handle dns_srv.
        (dns_generic_lookup): New function.
        (dns_lookup): Rewrite.
        (dns_srv_lookup): New function.
        * src/resolver.h (dns_srv): Use int instead of int16_t

2024-09-12  Sergey Poznyakoff  <gray@gnu.org>

        workflows: Expand run-check definition


2024-09-12  Sergey Poznyakoff  <gray@gnu.org>

        Update github workflows to build a version with dynamic backend
        support


2024-09-12  Sergey Poznyakoff  <gray@gnu.org>

        Ensure no other thread will access a backend when being removed.

        * src/config.c (backend_finalize): Bail out if dynamic backends
        are requested and DNS is disabled.
        * src/pound.h (service_recompute_pri)
        (service_recompute_pri_unlocked): New protos.
        * src/resolver.c
        (service_matrix_update_backends): Lock both service and backend. 
        Recompute service priorities when finished.
        (backend_matrix_disable): Don't lock backend when calling
        backend_matrix_init.
        * src/svc.c (thr_backend_remover): Destroy the mutex.
        (backend_schedule_removal): Don't set be->disabled.
        (service_recompute_pri)
        (service_recompute_pri_unlocked): New functions.
        (kill_be): Rewrite using service_recompute_pri.

2024-09-12  Sergey Poznyakoff  <gray@gnu.org>

        Remove dead code

        * src/pound.h (SERVICE): Remove abs_pri.  All uses updated.
        * src/svc.c (hash_backend): Remove.
        (find_backend_by_key): Remove call to hash_backend: sess_ttl
        cannot be 0. AFAICT, that code isn't used at least since version
        2.7

2024-09-12  Sergey Poznyakoff  <gray@gnu.org>

        Remove dead code

        * src/pound.h (SERVICE): Remove abs_pri.  All uses updated.
        * src/svc.c (hash_backend): Remove.
        (find_backend_by_key): Remove call to hash_backend: sess_ttl
        cannot be 0. AFAICT, that code isn't used at least since version
        2.7

2024-09-12  Sergey Poznyakoff  <gray@gnu.org>

        Minor change in get_backend.

        * src/svc.c (find_backend_by_key)
        (find_backend_by_header): Remove the no_be parameter.  Emergency 
        callback is selected by the caller.
        (get_backend): Don't try to use sessions if tot_pri <= 0.  Fall
        back to emergency callback, instead.

2024-09-12  Sergey Poznyakoff  <gray@gnu.org>

        Minor change in get_backend.

        * src/svc.c (find_backend_by_key)
        (find_backend_by_header): Remove the no_be parameter.  Emergency 
        callback is selected by the caller.
        (get_backend): Don't try to use sessions if tot_pri <= 0.  Fall
        back to emergency callback, instead.

2024-09-12  Sergey Poznyakoff  <gray@gnu.org>

        Update NEWS


2024-09-11  Sergey Poznyakoff  <gray@gnu.org>

        Minor changes


2024-09-11  Sergey Poznyakoff  <gray@gnu.org>

        Whitespace cleanup


2024-09-11  Sergey Poznyakoff  <gray@gnu.org>

        Fix compilation without adns


2024-09-11  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix in timer thread

        * src/svc.c (job_arm_unlocked): Fix the case when the job is to
        be scheduled after all existing jobs.

2024-09-11  Sergey Poznyakoff  <gray@gnu.org>

        Bugfixes.

        * src/resolver.c (backend_mark): Don't remove sessions yet.
        (backend_sweep): Mark backend as disabled and remove its
        sessions. Delete it from the hash table no matter what its
        refcount value.
        * src/svc.c (thr_backend_remover): Remove backend sessions, just 
        in case.
        (job_arm_unlocked): Fix the case if the job is to be scheduled
        after all existing jobs.

2024-09-11  Sergey Poznyakoff  <gray@gnu.org>

        Improve error handling.  Implement disable command for matrix
        backends.

        * src/config.c (assign_address_family): New keyword "any" maps 
        to AF_UNSPEC.
        (backend_parsetab, resolver_parsetab): New keyword:
        RetryInterval.
        (parse_config_file) [ENABLE_RESOLVER]: Call resolver_set_config
        before finalizing backends.
        * src/pound.h (be_matrix): New field: retry_interval.
        (backend_matrix_init): Change return type.
        (backend_matrix_disable): New proto.
        (service_session_remove_by_backend): New proto.
        (job_enqueue_unlocked): Remove proto.
        * src/resolver.c (dns_response_alloc): New function.
        (dns_state_create): Fix third argument to adns_init_logfn.
        (dns_get_state): Exit with error status if unable to get state.
        (errno_to_dns_status): New function.
        (dns_lookup_internal): New function.
        (dns_lookup): Rewrite using dns_lookup_internal.
        (backend_mark): Remove sessions associated with the backend.
        (service_matrix_update_backends): Ignore disabled backends. Fix
        error handling. Use job_enqueue instead of job_enqueue_unlocked.
        (backend_matrix_resolve): Replace with backend_matrix_init. On
        errors, schedule next DNS lookup at retry_interval seconds from
        the current time. The value of retry_interval from the matrix
        itself takes precedence over that from the resolver
        configuration.
        (backend_matrix_disable): New function.
        * src/resolver.h (resolver_config): New field: retry_interval.
        (RESOLVER_CONFIG_INITIALIZER): Initialize retry_interval to 600
        seconds.
        * src/svc.c: Initialize job_mutex with PTHREAD_MUTEX_RECURSIVE
        type.  All uses changed.
        (service_session_remove_by_backend): Remove static qualifier.
        (disable_handler): Use backend_disable to handle
        disabling/enabling of the backend.

2024-09-10  Sergey Poznyakoff  <gray@gnu.org>

        Fix compilation without resolver support


2024-09-10  Sergey Poznyakoff  <gray@gnu.org>

        Minor change


2024-09-10  Sergey Poznyakoff  <gray@gnu.org>

        lint


2024-09-10  Sergey Poznyakoff  <gray@gnu.org>

        Implement generation of regular backends from the matrix

        * src/pound.h (BACKEND_TABLE): New data type.
        (be_matrix): New field: betab.
        (backend_is_alive): Account for BE_MATRIX.
        (BACKEND): New field: mark.
        (backend_matrix_to_regular, backend_matrix_init)
        (backend_table_new, backend_schedule_removal): New protos.
        (JOB_FUNC): New type.
        (job_enqueue): New proto.
        * src/config.c (sockaddr_bytes): Now global.
        (backend_matrix_to_regular): Initial generation of backends from
        the matrix.
        * src/ht.h: Define X_FOREACH_SAFE.
        * src/resolver.c (service_matrix_update_backends): New function.
        (backend_matrix_init): New function.
        * src/svc.c (job_enqueue): Remove static qualifier.
        (backend_ref): Operate on regular backends only.
        (backend_schedule_removal): New function.
        (backend_unref): Schedule removal of the backend if its refcount 
        falls to zero.
        (backend_type_str): Handle BE_MATRIX backend type.
        (backend_serialize): Likewise.

        * src/poundctl.tmpl: Print matrix backends

2024-09-10  Sergey Poznyakoff  <gray@gnu.org>

        Introduce backend reference counter

        * src/pound.h (BACKEND): New field: refcount.
        * src/svc.c (backend_ref, backend_unref): New functions.
        (get_backend): Increment backend refcount.
        * src/config.c (backend_resolve): Initialize refcount to 1.
        * src/http.c (select_backend): Maintain backend reference
        counts.
        * src/pound.c (pound_http_destroy): Decrement backend refcount.

2024-09-10  Sergey Poznyakoff  <gray@gnu.org>

        Fix error detection in connect_nb

        * src/svc.c (connect_nb): Take into account POLLERR and POLLHUP
        bits.

2024-09-10  Sergey Poznyakoff  <gray@gnu.org>

        Fix error detection in connect_nb

        * src/svc.c (connect_nb): Take into account POLLERR and POLLHUP
        bits.

2024-09-09  Sergey Poznyakoff  <gray@gnu.org>

        Link backends in doubly-linked list to facilitate removal


2024-09-09  Sergey Poznyakoff  <gray@gnu.org>

        New backend statements: Family and Resolve.

        * src/config.c (assign_int_enum): New function.
        (set_proto_opt, assign_regex_type): Use assign_int_enum.
        (assign_address_family,assign_resolve_mode): New functions.
        * tests/regextype.at: Change expected output.

2024-09-09  Sergey Poznyakoff  <gray@gnu.org>

        Introduce "matrix" backend type.

        * configure.ac: New option --enable-resolver. Define conditional
        COND_RESOLVER and C macro ENABLE_RESOLVER if resolver support is
        enabled.
        * src/Makefile.am: New header resolver.h.
        [COND_RESOLVER]: New source resolver.c
        * src/pound.h (BE_BACKEND): Rename to BE_REGULAR. All uses
        changed.
        (BE_MATRIX): New backend type.
        (backed_resolve_mode): New enum.
        (be_matrix): New struct.
        (be_regular): New member: link.
        (BACKEND): Rename locus to locus_str. Add new locus field. New
        field: v.mtx.
        (SERVICE, LISTENER): Rename locus to locus_str.
        (stringbuf_consume): New function.
        * src/resolver.c: New file.
        * src/resolver.h: New file.
        * src/config.c: Initially parse backend definitions into
        backends of type BE_MATRIX.  When parsing is finished, convert
        those of them that have immediate resolve mode to BE_REGULAR. 
        This brings following changes:

            1. Port statement is optional.  If absent, the default is
        deduced from
              the protocol this backend uses (http vs. https).
           2. Address and Port statements can appear in any order.
        * src/http.c: Update.
        * src/log.c: Update.
        * src/svc.c: Update.
        * tests/config.at: Reflect changes.

2024-09-03  GitHub  <gray@gnu.org>

        Merge pull request #36 from leres/master

        Add missing \r when breaking up a long header in
        add_ssl_headers().
2024-09-03  Craig Leres  <leres@xse.com>

        Add missing \r when breaking up a long header in
        add_ssl_headers().


2024-09-03  Sergey Poznyakoff  <gray@gnu.org>

        Fix generation of X-SSL- headers describing client certificate.

        * src/http.c (trimwsl): New function.
        (get_line): return COPY_EOF only if no data has been stored in 
        the buffer.  Otherwise, return COPY_OK.
        (get_content_length, http_response_validate): Use trimwsl.
        (set_header_from_bio): New function.
        (add_ssl_headers): Ensure the BIO returns EOF on end of data. 
        Use set_header_from_bio to generate headers describing client 
        certificate.

2024-08-24  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.13


2024-08-22  Sergey Poznyakoff  <gray@gnu.org>

        Make sure pound has terminated when poundharness exits.

        * tests/poundharness.pl (EX_EXEC): New constant.
        (END): Wait explicitly for pound to exit: signal handlers are
        reset in the END block.

2024-08-21  Sergey Poznyakoff  <gray@gnu.org>

        Revamp RewriteLocation support.

        * src/config.c (backend_parse_servername): Don't require HTTPS. 
        ServerName can be used with plain HTTP backends as well.
        * src/svc.c (need_rewrite): Rewrite from scratch.
        * tests/poundharness.pl (http_redirect): Send original location
        in X-Orig-Location header.
        * tests/rewriteloc.at: Rewrite.
        * tests/rewriteloc_https.at: New test.
        * tests/testsuite.at: Include new test.
        * tests/Makefile.am: Add new test.
        * doc/pound.texi: Document changes.

2024-08-21  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix

        Follow-up to db4a0b44f3.

2024-08-20  Sergey Poznyakoff  <gray@gnu.org>

        Update NEWS


2024-08-20  Sergey Poznyakoff  <gray@gnu.org>

        Fix rewriteloc.at to match the recent changes


2024-08-20  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix

        * src/svc.c (need_rewrite): Fix protocol prefix comparison.

2024-08-18  Sergey Poznyakoff  <gray@gnu.org>

        Rewrite matching support.

        Instead of being fixed at compile time, the regex flavour to use
        can be selected in configuration file.  Two mechanisms are
        provided: the RegexType statement sets the regex type globally,
        for all statements that follow it, and special matching options
        -posix, -pcre (or -perl), change it for the given statement
        only.

        New matching flag is implemented: -contain.  This flag enables
        substring match.

        Instead of being translated to regular expressions, the -exact,
        -beg, and -end flags are implemented as special matchers. 
        Translation to POSIX regex is needed only in case of "Host"
        statement, which implies prefixing the pattern with
        "Host:[[:space:]]*".

        * configure.ac (COND_REGEX): Remove variable.
        * src/pound.h: Introduce "generic pattern" concept.
        (GENPAT): New data type.
        (genpat_compile): Rename to genpat_compile.
        (genpat_match,genpat_free,genpat_error,genpat_nsub): New protos.
        * src/config.c: New global statement: RegexType. New matching
        flags: -posix, -pcre, -perl, -contain.
        * src/regex_std.c: Remove.
        * src/genpat.c: New source.
        * src/regex_pcre.c: Rewrite as a genpat module.
        * src/regex_pcre2.c: Likewise.
        * tests/atlocal.in (PCRE_AVAILABLE): New variable, defined
        depending on the value of COND_PCRE and COND_PCRE2 conditionals.
        * tests/testsuite.at (PT_PREREQ_PCRE): New macro. Include
        pcre.at and regextype.at.
        * tests/Makefile.am: Add new files.
        * tests/pcre.at: New test.
        * tests/regextype.at: New test.
        * tests/host.at: Test regexp translation depending on the flags
        given
        (host_prefix_regex function).
        * tests/poundharness.pl (preproc): Treat argument to "Host -end"
        as
        "exact".
        * tests/url.at: Test the -contain flag.

2024-08-14  Sergey Poznyakoff  <gray@gnu.org>

        Document recent changes.


2024-08-13  Sergey Poznyakoff  <gray@gnu.org>

        Don't use pcreposix nor pcre2posix.

        Pcre2posix is not thread safe. Provide custom wrapper data types 
        and functions that make it possible to use pcre2 API directly.

        * am/pcre.m4: New file.
        * am/pcreposix.m4: Delete.
        * configure.ac: Use PND_PCRE macro.
        * src/regex_std.c: New file.
        * src/regex_pcre.c: New file.
        * src/regex_pcre2.c: New file.
        * src/Makefile.am: Add new sources.
        * src/extern.h: Use new regez wrapper types.
        * src/pound.h: Likewise.
        * src/config.c: Use new regex wrapper functions.
        * src/http.c: Likewise.
        * src/pound.c: Likewise.
        * src/svc.c: Likewise.

2024-08-12  Sergey Poznyakoff  <gray@gnu.org>

        Minor change in poundharness:

        * tests/poundharness.pl (runcom): Continue reading the output
        until at least one of the fds remains ready for reading.

2024-08-11  Sergey Poznyakoff  <gray@gnu.org>

        Validate backend responses

        This fixes https://github.com/graygnuorg/pound/issues/32

        * src/http.c (http_response_validate): New function.
        (backend_response): Call http_response_validate.  Reply with 503
        if response fails validation.

2024-08-08  Sergey Poznyakoff  <gray@gnu.org>

        Update NEWS


2024-08-06  Sergey Poznyakoff  <gray@gnu.org>

        Update .gitignore


2024-08-06  Sergey Poznyakoff  <gray@gnu.org>

        Update THANKS


2024-08-06  Sergey Poznyakoff  <gray@gnu.org>

        Fix deadlock in session expiration handling

        Deadlock occurred if a backend was selected by session right at
        the time when this session expired.  The get_backend function
        would lock the svc->mut mutex, and the
        service_rearm_expire_sessions function called during service
        promotion would lock the job_mutex.  At the same time, thr_timer
        would lock job_mutex, and call expire_session, which would
        attempt to lock svc->mut.

        * src/svc.c (job_enqueue_unlocked, job_enqueue_after_unlocked)
        (job_enqueue, job_enqueue_after): Mark as static.
        (job_rearm_unlocked, job_rearm): Remove functions.
        (JOB_FUNC): New typedef.
        (JOB): Change type of the func field.
        * src/pound.h (job_enqueue_unlocked, job_enqueue_after_unlocked)
        (job_enqueue, job_enqueue_after, job_rearm_unlocked)
        (job_rearm): Remove prototypes.
        (expire_sessions): Iterate over expire list until an entry is
        found whose expire timestamp is greater than current time.
        (service_session_promote)
        (service_session_remove_by_key)
        (service_session_remove_by_backend): Don't attempt to rearm
        expire jobs: this could cause deadlock on svc->mut / job_mutex.
        (find_backend_by_key, find_backend_by_header): Mark as static.

2024-08-05  Sergey Poznyakoff  <gray@gnu.org>

        Fix typo in status string


2024-08-04  Sergey Poznyakoff  <gray@gnu.org>

        Fix HTTPS tests.

        * tests/poundharness.pl (PoundScript::new): Disable SSL
        verification explicitly: default changed in HTTP::Tiny 0.088
        from 0 to 1.

2024-08-04  Sergey Poznyakoff  <leo@debian.org>

        Minor change: fix wording of the GDFL license


2024-08-04  Sergey Poznyakoff  <gray@gnu.org>

        Avoid infinite recursion in xnomem.


2024-06-26  Sergey Poznyakoff  <gray@gnu.org>

        Configurable syslog tag

        * src/extern.h (syslog_tag): New extern.
        * src/pound.c (syslog_tag): New variable.
        (main): Use syslog_tag, if set, and progname otherwise.
        * src/config.c: New global statement: LogTag.
        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * doc/pound.texi: Likewise.
        * configure.ac: Version 4.12.90

2024-06-14  Sergey Poznyakoff  <gray@gnu.org>

        Improve detection of malformed requests and I/O errors.

        This fixes https://github.com/graygnuorg/pound/issues/28

        * src/http.c (COPY_BAD_DATA, COPY_TOO_LONG): New error codes.
        (copy_status_string): Handle these.
        (get_line): Return COPY_ status codes.  All uses changed.
        (copy_chunks): Don't forward malformed chunks.

2024-06-06  Sergey Poznyakoff  <gray@gnu.org>

        Spell fixes.


2024-04-26  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.12


2024-04-10  Sergey Poznyakoff  <gray@gnu.org>

        Return 405 on forbidden methods. Reword a deprecation hint.

        * doc/pound.8: Document changes.
        * doc/pound.texi: Likewise.
        * src/config.c: Reword the IgnoreCase deprecation message.
        * src/http.c (http_status): Define the
        HTTP_STATUS_METHOD_NOT_ALLOWED status.
        (parse_http_request): Return HTTP_STATUS_METHOD_NOT_ALLOWED if
        the method is forbidden by configuration settings.
        * src/pound.h (HTTP_STATUS_METHOD_NOT_ALLOWED): New code.
        * tests/err501.at: Rename to tests/err503.at. Rewrite test
        logic.
        * tests/errfile.at: Use 405 status instead of 501.
        * tests/warndep.at: Update.
        * tests/xhttp.at: Expect 405 instead of 501.

2024-04-05  Sergey Poznyakoff  <gray@gnu.org>

        Improve tests

        * src/config.c (assign_string_from_file): Bail out unless file
        is a regular non-empty file.
        * tests/Makefile.am: Add new tests.
        * tests/testsuite.at: Likewise.
        * tests/err501.at: New file.
        * tests/warndep.at: New file.
        * tests/errfile.at: Use ErrorFile instead of the deprecated
        ErrNNN directive, which is tested elsewhere.
        * tests/error.at: Likewise.

2024-04-04  Sergey Poznyakoff  <gray@gnu.org>

        Minor changes in manpage


2024-04-02  Sergey Poznyakoff  <gray@gnu.org>

        Use designated structure initializers for parser tables.


2024-04-02  Sergey Poznyakoff  <gray@gnu.org>

        Revamp configuration keyword table structure.

        * src/config.c (keyword_type): New enum.
        (PARSER_TABLE): New fields: type, ref, deprecated, and message. 
        Remove deprecation and full_message.
        (parser_find): Rewrite. Descend into referenced tables.
        (parse_statement): Update calls to parser_find.
        (MATCH_CONDITIONS, REWRITE_OPS)
        (MATCH_RESPONSE_CONDITIONS, REWRITE_RESPONSE_OPS): Remove
        macros.
        (match_conditions, rewrite_ops)
        (match_response_conditions, rewrite_response_ops): New parser 
        tables.  Use them as soft references in all tables where the 
        above macros were used.

2024-03-30  Sergey Poznyakoff  <gray@gnu.org>

        Optionally limit the URI length.

        New listener configuration directive MaxURI sets the maximum
        allowed length of an URI.

        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * doc/pound.texi: Likewise.

        * src/config.c (http_parsetab, https_parsetab): New statement:
        MaxURI.
        * src/pound.h (max_req): Rename to max_req_size. All uses
        changed. New field: max_uri_length.
        * src/http.c (do_http): Optionally check if URI length is OK.

        * tests/maxuri.at: New testcase.
        * tests/Makefile.am: Add new testcase.
        * tests/testsuite.at: Add new testcase.

2024-03-30  Sergey Poznyakoff  <gray@gnu.org>

        Fix 16c51351a8 (add missing return statement)


2024-03-29  Sergey Poznyakoff  <gray@gnu.org>

        Remove yet another superfluous field.

        * src/pound.h (LISTENER): Remove has_pat. Change type of url_pat 
        to regex_t*. All uses changed.

2024-03-29  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix

        * src/config.c (gettkn): Fix eventual (and rather improbable)
        use of uninitialized variable.

2024-03-29  Sergey Poznyakoff  <gray@gnu.org>

        Remove unnecessary listener field.

        * src/pound.h (LISTENER): Remove 'has_other'.  All uses changed.

2024-03-29  Sergey Poznyakoff  <gray@gnu.org>

        Update NEWS


2024-03-29  Sergey Poznyakoff  <gray@gnu.org>

        Reject requests with unrecognized transfer encodings

        This fixes https://github.com/graygnuorg/pound/issues/25.

        * src/http.c (do_http): Disallow unrecognized transfer
        encodings.
        * tests/invenc.at: New test case.
        * tests/Makefile.am: Add new test.
        * tests/testsuite.at: Likewise.

2024-03-29  Sergey Poznyakoff  <gray@gnu.org>

        Reject requests containing both Transfer-Encoding and
        Content-Length

        This fixes https://github.com/graygnuorg/pound/issues/26.

        * src/http.c (transfer_encoding): New enum.
        (do_http): Fix detection of Transfer-Encoding and Content-Length
        being used together.

2024-03-28  Sergey Poznyakoff  <gray@gnu.org>

        Issue warning messages if deprecated statements are used in
        configuration.

        * src/extern.h (FEATURE_DEPRECATION): New constant.
        * src/config.c (PARSER_TABLE): New fields: deprecation and
        full_message.
        (parse_statement): Warn if a deprecated statement is encountered
        and the FEATURE_DEPRECATION feature is set. Mark all deprecated
        statements as such.
        (feature): Define the FEATURE_DEPRECATION feature.
        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * doc/pound.texi: Likewise.

2024-03-28  Sergey Poznyakoff  <gray@gnu.org>

        New statement ErrorFile

        This statement obsoletes ErrNNN statements.
        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * doc/pound.texi: Likewise.
        * src/config.c (parse_errorfile): New function.
        (http_parsetab, https_parsetab): New keyword: ErrorFile

2024-03-28  Sergey Poznyakoff  <gray@gnu.org>

        Update copyright year


2024-03-28  Sergey Poznyakoff  <gray@gnu.org>

        Improve diagnostic messages

        * src/http.c (COPY_OK, COPY_EOF)
        (COPY_READ_ERR, COPY_WRITE_ERR): New constants.
        (copy_status_string): New function.
        (copy_bin): Return COPY_* status codes. Use BIO_should_retry to
        avoid spurious errors.
        (acme_response,error_response,copy_chunks): Analyze response
        from copy_bin.
        (http_request_read): Return internal HTTP status.
        (parse_http_request): Likewise.  Discern between internal server
        error and bad request.
        (log_error): New function.
        (rest of functions): Use log_error where necessary. Improve
        message wording.

2024-03-27  Sergey Poznyakoff  <gray@gnu.org>

        Fix improper use of @asis in the docs


2024-03-26  Sergey Poznyakoff  <gray@gnu.org>

        Minor changes


2024-03-12  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.11.90


2024-03-12  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix

        * src/svc.c (session_remove_handler, session_add_handler): Add
        missing terminating \0.

2024-02-23  Sergey Poznyakoff  <gray@gnu.org>

        Add makeinfo init file for online docs


2024-02-22  Sergey Poznyakoff  <gray@gnu.org>

        Add texinfo documentation


2024-02-21  Sergey Poznyakoff  <gray@gnu.org>

        Accept ServerName directive in the Emergency section.

        * src/config.c (emergency_parsetab): Add ServerName.

2024-02-07  Sergey Poznyakoff  <gray@gnu.org>

        When rewriting a response, apply rules from the service first,
        then the ones from the listener

        * doc/pound.8: Document the changes.
        * src/http.c (error_response)
        (backend_response): Revert the order in which rewrites are
        applied.

2024-02-04  Sergey Poznyakoff  <gray@gnu.org>

        Don't try to access the include directory, unless needed by
        configuration.

        This fixes https://github.com/graygnuorg/pound/issues/24

        * src/config.c: Preserve errno.
        (workdir_unref): Accept NULL argument.
        (workdir_free): Return status code.
        (workdir_cleanup): Resolve cwd if in daemon or root_jail mode.
        (get_include_wd_at_locus_range)
        (get_include_wd): New functions.
        (fopen_include): Return NULL if unable to get include directory.
        (push_input): Don't access include directory for absolute file
        names.
        (parse_includedir): Use workdir_get.
        (cond_pass_file_fixup): Use get_include_wd_at_locus_range to
        obtain include directory.
        (parse_config_file): Change handling of include_wd. Always
        fix-up BasicAuth file names.
        (set_include_dir): Make sure that argument is an existing
        directory name.

2024-01-06  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix

        * src/mem.c (stringbuf_vprintf): Offset sb->base only if it is
        not NULL. This avoids undefined behavior.

        Reported by Ben Kallus.

2024-01-04  Sergey Poznyakoff  <gray@gnu.org>

        Update copyright dates in manpages


2024-01-03  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.11


2024-01-03  Sergey Poznyakoff  <gray@gnu.org>

        Update copyright years


2023-12-14  Sergey Poznyakoff  <gray@gnu.org>

        Spell-checking


2023-12-14  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix

        * tests/Makefile.am: Add header.at to distribution.

2023-11-25  Sergey Poznyakoff  <gray@gnu.org>

        Rewrite content length parser

        * src/config.c (assign_CONTENT_LENGTH): Use strtoclen
        * src/http.c (strtoclen): New function.
        (get_content_length): Use strtoclen. Strict input checking.
        (copy_chunks): Return internal status code. All uses changed.
        * src/pound.h (STRTOCLEN): Remove.
        (CONTENT_LENGTH_MAX): New macro.
        * tests/poundharness.pl: Implement chunked transfer coding.
        * tests/Makefile.am: Add new test.
        * tests/chunked.at: New test.
        * tests/errfile.at: Fix trailing newlines in macro definitions.
        * tests/error.at: Likewise.
        * tests/testsuite.at: Include new test.

2023-11-25  Sergey Poznyakoff  <gray@gnu.org>

        New file for declaring combinable multi-value headers

        * src/mvh.inc: New file.
        * src/Makefile.am (pkgdata_DATA): Add mvh.inc
        * NEWS: Document changes.
        * doc/poundctl.8: Minor changes.

2023-11-04  Sergey Poznyakoff  <gray@gnu.org>

        Minor change

        * src/config.c: Warn about non-regular files.

2023-11-04  Sergey Poznyakoff  <gray@gnu.org>

        Argument to Cert statement in ListenHTTPS can be a directory

        * NEWS: Document changes.
        * doc/pound.8: Document changes.
        * src/config.c (openssl_error_at_locus_range): Change signature. 
        Take filename as argument.
        (conf_openssl_error): Likewise. All uses changed.
        (load_cert): New function.
        (https_parse_cert): Load all files from the directory.
        * src/mem.c (stringbuf_truncate): New function.
        * src/pound.h: New prototype.

2023-10-22  Sergey Poznyakoff  <gray@gnu.org>

        Optionally coalesce multiple-value headers to one value.

        * src/ht.h: New file.
        * src/pound.h (H_APPEND): New header insertion mode.
        (combinable_header_add): New proto. Use ht.h to generate service
        hash tables. Remove long unused CTRL_ definitions.
        * src/Makefile.am: Add ht.h
        * src/config.c: New statement CombineHeaders. Use ht.h to
        generate backend hash tables.
        * src/http.c (combinable_header_add, is_combinable_header): New
        functions.
        (cs_locate_token): New function.
        (http_header_list_append): Handle H_APPEND.
        (http_request_read): For headers from multival_header list,
        coalesce multiple headers into a single comma-separated one.
        (add_forwarded_headers): Append X-Forwarded-For to the existing
        header, if any.
        (backend_response): Use cs_locate_token to look for values in
        multi-value headers.
        (do_http): Likewise. Bail out on multiple Transfer-Encoding
        headers.

        * tests/poundharness.pl (parse_headers): Support multiple
        headers.
        * tests/optorder.at: Fix expectation.
        * tests/chunked2.at: New file.
        * tests/multival.at: New file.
        * tests/Makefile.am: Add new tests.
        * tests/testsuite.at: Likewise.

2023-10-22  Sergey Poznyakoff  <gray@gnu.org>

        Implement SNI for HTTPS backends

        * src/pound.h (be_regular): New field: servername.
        * src/config.c (disable_proto): Fix improper dereferencing of
        call_data.
        (backend_parse_servername): New function.
        (backend_parsetab): New statement: ServerName.
        * src/http.c (send_to_backend): Rewrite Host: header if
        servername is set in the backend.
        (open_backend): Set SNI if servername is set.
        * doc/pound.8: Document changes.

2023-10-13  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.10


2023-10-10  Sergey Poznyakoff  <gray@gnu.org>

        Improve manpage


2023-10-12  Sergey Poznyakoff  <gray@gnu.org>

        Fix detection of multiple Transfer-Encoding headers


2023-10-11  Sergey Poznyakoff  <gray@gnu.org>

        Add missing include file

        * src/pound.h: Include limits.h

2023-10-11  Sergey Poznyakoff  <gray@gnu.org>

        Don't allow leading '+' in content lengths either


2023-10-11  Sergey Poznyakoff  <gray@gnu.org>

        Strict checking of the content and chunk lengths

        * src/http.c (CL_HEADER, CL_CHUNK): New constants.
        (get_content_length): Don't allow for sign or 0x prefix. In
        CL_CHUNK mode, accept optional transfer extension part.

2023-09-15  Sergey Poznyakoff  <gray@gnu.org>

        Revamp nonblocking connection routine

        * src/svc.c (connect_nb): Rewrite.  Query SO_ERROR only if poll 
        returned an exception.

2023-09-14  Sergey Poznyakoff  <gray@gnu.org>

        Host config directive uses exact match by default.

        * src/config.c (parse_cond_host): Use exact match by default.
        * tests/poundharness.pl (preproc): Process included files 
        recursively. Process arguments to Host directives.
        * tests/incldir.at: Don't use --preproc options on the names of
        included files.  They are processed automatically. Move first
        include inside the ListenHTTP statement.
        * tests/inclnest.at: Likewise.
        * tests/include.at: Likewise.
        * tests/resprw.at: Use explicit -re option to Host.
        * NEWS: Document changes.

2023-09-12  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix: always honor -e

        * src/config.c (parse_config_file): Take second argument to 
        control log_facility settings.  Ignore setting from
        configuration file if it is true,
        (config_parse): Pass stderr_option to parse_config_file.

2023-09-11  Sergey Poznyakoff  <gray@gnu.org>

        Make sure all password files remain accessible in daemon and
        RootJail modes.

        This partially reverts 65b0579c91.

        * src/pound.h (WORKDIR): New data type.
        (pass_file): New field: wd.
        (fopen_wd): New proto.
        (fopen_error): Change signature.
        * src/bauth.c (pass_file_fill): Use fopen_wd.
        * src/config.c (include_fd): Remove static.
        (workdir_head, include_wd): New variables.
        (workdir_get, workdir_ref)
        (workdir_unref, workdir_free)
        (workdir_cleanup): New functions.
        (fopen_wd): New function.
        (fopen_include): Restore static qualifier. Rewrite as a wrapper 
        over fopen_wd.
        (fopen_error): New argument: wd.
        (assign_string_from_file): Use fopen_wd.
        (listener_pass_file_fixup, service_pass_file_fixup): New
        functions.
        (parse_config_file): Fix-up wd members of struct pass_file in 
        conditionals when in daemon or rootjail mode. Clean up workdir
        list when done.

2023-09-10  Sergey Poznyakoff  <gray@gnu.org>

        Minor changes


2023-09-09  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.9.91


2023-09-08  Sergey Poznyakoff  <gray@gnu.org>

        testsuite: remove useless AT_TESTED directive


2023-09-08  Sergey Poznyakoff  <gray@gnu.org>

        BasicAuth: Cache password file

        * configure.ac: Check if struct stat has st_mtim member.
        * src/bauth.c (basic_auth_internal): Use cached file content. 
        Re-read it if file's mtime changed.
        * src/pound.h (user_pass): New struct.
        (USER_PASS_HEAD): New data type.
        (pass_file): New fields: mtim, head.
        * NEWS: Document changes.
        * doc/pound.8: Likewise.

2023-09-08  Sergey Poznyakoff  <gray@gnu.org>

        BasicAuth: read relative file names from IncludeDir

        * src/bauth.c (basic_auth_internal): Use fopen_include. Remove
        const qualifier from first argument (for future use).
        * src/config.c (open_include_dir): Assume CWD if dir is NULL.
        (fopen_include): Remove static qualifier.
        (fopen_error): New function.
        (parse_config_file): If in daemon or rootjail mode, make sure
        include_fd is an actual fd, not AT_FDCWD. Don't free namelist:
        its elements may be referenced by some objects in the
        configuration.
        * src/http.c (match_cond): Change signature: remove const from
        the first argument.
        * src/pound.h (pass_file): Remove dir and dirname. Use
        include_dir for relative names.
        (match_cond): Change signature.
        (fopen_include, fopen_error): New functions.
        * src/svc.c (match_service): Change signature.

2023-09-08  Sergey Poznyakoff  <gray@gnu.org>

        Bugfixes

        * doc/pound.8: Escape literal backslashes.
        * src/poundctl.c (read_response_line): Don't return local
        variable address.

2023-09-08  Sergey Poznyakoff  <gray@gnu.org>

        Mention backend IP:PORT in connect_nb messages


2023-09-03  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.9.90


2023-09-03  Sergey Poznyakoff  <gray@gnu.org>

        Document recent changes


2023-09-03  Sergey Poznyakoff  <gray@gnu.org>

        Fix basicauth in RootJail mode.

        * src/bauth.c (basic_auth_internal)
        (basic_auth): Get pointer to struct pass_file as argument.
        * src/config.c (parse_cond_basic_auth): Initialize cond->pwfile.
        (parse_config_file): If RootJail is requested, open directories 
        for each struct pass_file used in conditionals.
        * src/pound.h (locus_point, locus_range): New struct definitions
        (from config.c)
        (struct pass_file): New struct.
        (SERVICE_COND): Change type of pwfile to struct pass_file.
        * src/svc.c (foreach_listener, foreach_service): New functions.

2023-09-03  Sergey Poznyakoff  <gray@gnu.org>

        Use EVP digest routines for basic auth support

        * src/bauth.c: Rewrite using EVP.

2023-09-02  Sergey Poznyakoff  <gray@gnu.org>

        Add missing copyleft header.


2023-09-02  Sergey Poznyakoff  <gray@gnu.org>

        Expand request accessors in Rewrite response statements

        * src/http.c (expand_string_to_buffer)
        (expand_string,expand_url,rewrite_apply)
        (match_cond,rewrite_op_apply,rewrite_rule_check): Simplify
        calling convention. Pass a pointer to POUND_HTTP as argument. 
        All uses changed.
        * src/pound.h (get_service, match_cond): Change prototypes.
        * tests/resprw.at: New test.
        * tests/Makefile.am: Add new test.
        * tests/testsuite.at: Likewise.

2023-09-02  Sergey Poznyakoff  <gray@gnu.org>

        Rewrite statement allows for rewriting responses as well as
        requests.

        * NEWS: Document changes.
        * src/config.c: Rewrite statement accepts optional argument 
        specifying what object to apply rewrites to: request or
        response.
        "Rewrite response" construct allows for a limited set of request 
        matching and modification statements.
        * src/http.c (err_401_headers): Remove. All uses changed.
        (parse_header_text): New function.
        (error_response,backend_response): Apply response rewriting
        procedures.
        (http_headers_send): New function.
        (http_request_send): Use http_headers_send.
        * src/pound.h (REWRITE_REQUEST, REWRITE_RESPONSE): New
        constants.
        (SERVICE): Change type of the rewrite field to array of two 
        REWRITE_RULE_HEAD.  All uses changed.
        (LISTENER): Likewise.
        * tests/error.at: Fix typo in the error text.

2023-08-27  Sergey Poznyakoff  <gray@gnu.org>

        Initial support for basic auth

        * NEWS: Update.
        * configure.ac: Check for crypt(3) and crypt.h
        * src/Makefile.am: Add new source.
        * src/bauth.c: New file.
        * src/config.c (MATCH_CONDITIONS): New condition: BasicAuth
        (http_parsetab,https_parsetab): New statement Err401 and Err403.
        * src/http.c (http_status): Add HTTP_STATUS_UNAUTHORIZED and 
        HTTP_STATUS_FORBIDDEN.
        (err_401_headers): New static.
        (bio_err_reply,error_response): Use err_401_headers for 
        HTTP_STATUS_UNAUTHORIZED.
        (error_response): Remove useless calls to rewrite_apply.
        (http_request_get_basic_auth): New function.
        (match_cond): Handle COND_BASIC_AUTH.
        (do_http): Remove special handling of the Authorization header. 
        It is done on request now.
        * src/log.c (i_user_name): Rewrite.
        * src/pound.h (HTTP_STATUS_UNAUTHORIZED)
        (HTTP_STATUS_FORBIDDEN): New constants.
        (http_request): Remove user field. All uses removed.
        (COND_BASIC_AUTH): New condition type.
        (SERVICE_COND): New (nameless union) field: pwfile.
        (http_request_get_basic_auth, basic_auth): New protos.

2023-08-26  Sergey Poznyakoff  <gray@gnu.org>

        Add tests for poundctl

        * src/poundctl.c (get_socket_name): Fix error message.
        * tests/poundharness.pl: Implement external program send/expect 
        sequences.
        * tests/disable.at: New test.
        * tests/list.at: New test.
        * tests/sessctl.at: New test.
        * tests/Makefile.am: Add new tests.
        * tests/testsuite.at: Include new tests.

2023-08-25  Sergey Poznyakoff  <gray@gnu.org>

        Global backend definitions

        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * src/config.c (NAMED_BACKEND, NAMED_BACKEND_TABLE): New types.
        (POUND_DEFAULTS): New field: named_backend_table.
        (parse_backend_internal): Take start locus as additional
        argument.
        (parse_backend): Support a form with one string label.
        (service_parsetab): New statement: UseBackend.
        (top_level_parsetab): New statement: Backend.
        (parse_config_file): Initialize named_backend_table. Use it on 
        successful parse termination to resolve references to globally 
        defined backends and free afterwards.
        * src/pound.h (BE_BACKEND_REF): New intermediate backend type.
        (BACKEND): New field: v.be_name.
        (foreach_backend): New proto.
        * src/svc.c (foreach_backend): New function.

        * tests/nb.at: New test file.
        * tests/Makefile.am: Add new test.
        * tests/testsuite.at: Include new test.

2023-08-25  Sergey Poznyakoff  <gray@gnu.org>

        Work around broken pcre2posix builds on Debian systems

        * am/pcreposix.m4: Detect if reg*() functions in libpcre2posix 
        have been renamed to PCRE2reg*(), and rename them back if so.

2023-08-23  Sergey Poznyakoff  <gray@gnu.org>

        Update software requirements in README.md


2023-08-22  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.9


2023-08-22  Sergey Poznyakoff  <gray@gnu.org>

        Add the "log" testsuite keyword


2023-08-22  Sergey Poznyakoff  <gray@gnu.org>

        Reword some descriptions


2023-08-21  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.8.91


2023-08-20  Sergey Poznyakoff  <gray@gnu.org>

        Improve logging configuration

        This introduces new service configuration statement SuppressLog,
        which suppresses HTTP logging for particular classes of response
        status codes, introduces new log format conversion specifier
        %{OBJ}L, which is expanded to the location of the object OBJ
        (listener, service, or backend) in the configuration file, and
        replaces specifiers %L, %R, and %S with
        ${listener}N, ${backend}N, and %{service}N, correspondingly.

        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * src/config.c (parse_backend_internal)
        (parse_redirect_backend,parse_error_backend)
        (parse_service,parse_acme,
        (parse_listen_http,parse_listen_https)
        (parse_control): Initialize locus field.
        (canned_log_format): Change format definitions.
        (parse_log_suppress): New function.
        (service_parsetab): New statement: LogSuppress.
        * src/log.c: Support for new specifier.
        (http_log): Use log_suppress_mask to decide whether to suppress 
        log message.
        * src/pound.c (main): Check return from listen.
        * src/pound.h (BACKEND, SERVICE, LISTENER): New field: locus.
        (SERVICE): New field: log_suppress_mask.
        (STATUS_MASK): New define.

        * tests/logsup.at: New test.
        * tests/Makefile.am: Add new test.
        * tests/testsuite.at: Likewise.
        * tests/logfmt.at: Update formats.

2023-08-16  Sergey Poznyakoff  <gray@gnu.org>

        Log format: use %{NAME}N for Pound object name


2023-08-16  Sergey Poznyakoff  <gray@gnu.org>

        Revamp log format parser to speed-up the generated
        log-formatting code.


2023-08-16  Sergey Poznyakoff  <gray@gnu.org>

        New log conversion specifier: %L (listener name)


2023-08-10  Sergey Poznyakoff  <gray@gnu.org>

        Optionally use X-Forwarded-For header to log originating ip.

        * NEWS: Document changes.
        * doc/pound.8: Document changes.
        * src/config.c (service_parsetab)
        (http_parsetab,https_parsetab): New statements: ForwardedHeader
        and TrustedIP.
        * src/extern.h (forwarded_header,trusted_ips): New externs.
        * src/http.c (do_http): Stash away the forwarded header before
        calling the backend (which may modify it).
        * src/log.c (i_forwarded_ip): New function. Try to obtain
        originator IP from the forwarded header.
        (http_log_spec): Use i_forwarded_ip to handle '%a'.
        * src/pound.c (forwarded_header, trusted_ips): New variables.
        (pound_http_destroy): Free orig_forwarded_header.
        * src/pound.h (SERVICE, LISTENER): New fields: forwarded_header, 
        trusted_ips.
        (POUND_HTTP): New field: orig_forwarded_header.

2023-08-09  Sergey Poznyakoff  <gray@gnu.org>

        Document new features


2023-08-09  Sergey Poznyakoff  <gray@gnu.org>

        Implement LogFormat directive

        * src/config.c (POUND_DEFAULTS): Revert to int log_level.
        (log_format_diag): Change signature.
        (parse_log_level): String argument refers to the name of
        user-defined format, which must have been declared previously 
        using the LogFormat directive.
        (parse_log_format): New function.
        (top_level_parsetab): New statement: LogFormat.
        (parse_config_file): Compile all built-in formats before
        proceeding.
        * src/log.c (http_log_prog): New field: name.
        (http_log_format_compile): New function.
        (http_log_format_find,http_log_format_check): New functions.
        (http_log): Get format prog from the format table.
        * src/pound.h (MAX_HTTP_LOG_FORMATS): New constant.
        (HTTP_LOG_PROG): Remove typedef.
        (http_log_compile): Remove proto.
        (http_log_format_compile,http_log_format_find)
        (http_log_format_check): New protos.
        * tests/Makefile.am: Add new test.
        * tests/testsuite.at: Include new test.
        * tests/logfmt.at: New file.
        * tests/loglevrun.at: Add keywords.
        * tests/loglevcomp.at: Likewise.
        * tests/poundharness.pl: Negative --log-level value means don't
        touch existing LogLevel statement.

2023-08-09  Sergey Poznyakoff  <gray@gnu.org>

        Configurable logging

        * src/Makefile.am: Add new source.
        * src/config.c (parse_log_level): Accept both canned format
        numbers
        (levels) and log format specifications.
        * src/http.c (method_name): New function.
        (http_request_orig_line)
        (http_request_get_url,http_request_get_query)
        (http_request_user_name): Removed.
        (anon_addr2str): Move to log.c
        (http_log): Remove.
        (do_http): Store end time in POUND_HTTP.end_req
        * src/log.c: New file.
        * src/mem.c (stringbuf_strftime): New function.
        * src/pound.h (method_name): New proto.
        (HTTP_LOG_PROG): New data type.
        (http_log_compile): New proto.
        (LISTENER): Replace log_level with HTTP_LOG_PROG log_prog
        (POUND_HTTP): New field: end_req.
        (http_log, stringbuf_strftime): New protos.
        (http_request_get_url,http_request_get_query): New protos.
        * tests/Makefile.am: Add new tests.
        * tests/testsuite.at: Include new tests.
        * tests/loglevcomp.at: New file.
        * tests/loglevrun.at: New file.

2023-08-08  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix

        * src/http.c (find_method): Use 2nd argument (length).

2023-08-08  Sergey Poznyakoff  <gray@gnu.org>

        Bugfixes

        * src/config.c (build_regex): Remove leading caret from the
        expression, if prefix is supplied in MATCH_RE mode. This makes
        Host "^x" work as expected.
        * src/http.c (http_header_change): Clear cached value. This way
        changes become visible to matching directives that follow.

2023-08-08  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix

        * src/config.c (close_include_dir): Reset include_fd.

2023-08-08  Sergey Poznyakoff  <gray@gnu.org>

        Improve the description of StringMatch


2023-08-07  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix

        * src/config.c (input_open): Don't use include_dir if include_fd
        is AT_FDCWD.

2023-08-07  Sergey Poznyakoff  <gray@gnu.org>

        Spell checking


2023-08-07  Sergey Poznyakoff  <gray@gnu.org>

        Implement StringMatch matcher, host and port accessors.

        * NEWS: Document changes.
        * configure.ac: Version 4.8.90.
        * doc/pound.8: Likewise.
        * src/config.c (build_regex): Fix the exact matching,
        * src/http.c (parse_cond_matcher): Implement COND_STRING_MATCH.
        (MATCH_CONDITIONS): Add StringMatch.
        (accessors): change signatures.
        (accessor_host, accessor_port): New accessors.
        (rewrite_apply): Change signature: take struct submatch_queue
        pointer as last argument. All uses changed.
        (match_cond): Implement COND_STRING_MATCH.
        * src/pound.h (query_param_match): Remove struct definition.
        (STRING_REF, struct string_match): New types.
        (SERVICE_COND): Replace struct query_param_match with
        string_match.
        * tests/Makefile.am: Add new tests.
        * tests/testsuite.at: Include new tests.

2023-07-25  Sergey Poznyakoff  <gray@gnu.org>

        Minor improvement


2023-07-25  Sergey Poznyakoff  <gray@gnu.org>

        Improve testsuite and documentation

        * README.md: Document testsuite and bug reporting.
        * tests/poundharness.pl: Skip tests if a HTTPS listener is
        required but HTTP::Tiny does not support SSL.

2023-05-28  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.8


2023-05-11  Sergey Poznyakoff  <gray@gnu.org>

        poundctl: ignore empty lines in pound.cfg


2023-05-11  Sergey Poznyakoff  <gray@gnu.org>

        Fix improper use of va_list

        * NEWS: Document changes.
        * configure.ac: Version 4.7.90
        * src/pound.c (vlogmsg): Use va_copy to reuse va_list.

2023-05-08  Sergey Poznyakoff  <gray@gnu.org>

        Support for libpcre2posix

        * Makefile.am (ACLOCAL_AMFLAGS): New variable.
        * NEWS: Document changes.
        * README.md: Likewise.
        * acinclude.m4: Rename to am/ax_pthread.m4
        * am/pcreposix.m4: New file.
        * configure.ac: Use PND_PCREPOSIX macro.
        * src/Makefile.am: Update.
        * src/pound.h: Include pcre2posix.h if available.

2023-04-19  Sergey Poznyakoff  <gray@gnu.org>

        Spelling fixes


2023-04-17  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.7


2023-04-17  Sergey Poznyakoff  <gray@gnu.org>

        Revise the docs


2023-04-06  Sergey Poznyakoff  <gray@gnu.org>

        poundctl: parse the block form of Control statement


2023-04-05  Sergey Poznyakoff  <gray@gnu.org>

        Block form of the Control statement.

        The Control statement in block form allows the user to specify
        socket file mode and change its ownership.

        * NEWS: Document changes.
        * doc/pound.8: Document changes.
        * src/config.c (push_input): Fix diagnostic message.
        (listener_alloc): Initialize mode.
        (parse_control_socket,parse_control): New functions.  Support 
        inline and block forms of the Control statement.
        * src/pound.c (main): Optionally set socket mode and ownership.
        * src/pound.h (LISTENER): New fields: mode and chowner.

2023-04-04  Sergey Poznyakoff  <gray@gnu.org>

        Reword the "thread terminating" message.

        Change proposed by Simon Matter.

2023-04-04  Sergey Poznyakoff  <gray@gnu.org>

        Log backend responses properly

        * src/http.c (backend_response): Don't free phttp->response
        prematurely. It is needed for http_log in the caller.

2023-03-30  Sergey Poznyakoff  <gray@gnu.org>

        Fix eventual double-free in get_user.


2023-03-30  Sergey Poznyakoff  <gray@gnu.org>

        Minor fixes

        * configure.ac: Use canonical host to guess if the program is
        going to be linked with glibc and set the
        early_pthread_cancel_probe accordingly.
        * src/pound.c (unlink_file_location): Close fd.
        * NEWS: Update.
        * README.md: Update.

2023-03-29  Sergey Poznyakoff  <gray@gnu.org>

        More RootJail related changes

        Content of files supplied with Error statements is read at
        startup. PID file and control socket are properly removed on
        exit even after chroot.

        * NEWS: Document changes.
        * README.md: Likewise.
        * doc/pound.8: Likewise.
        * src/config.c (parse_error_backend): Read the file here and
        store its content in error.text.
        (parse_control_global): Use unlink_at_exit.
        * src/http.c (error_response): Send error.text instead of
        opening the file and reading it.
        * src/pound.c (unlink_at_exit): New function.  Arrange for the
        file to be removed even in jail mode.
        (pidfile_create): Use unlink_at_exit.
        * src/pound.h (be_error): Replace file (file name) with text
        (file content).
        (unlink_file): Remove proto.
        (unlink_at_exit): New proto.
        * src/svc.c (str_be, backend_serialize): Reflect the changes.

2023-03-29  Sergey Poznyakoff  <gray@gnu.org>

        Fix the libgcc_s.so.1 must be installed problem in RootJail.

        * NEWS: Document changes.
        * README.md: Likewise.
        * configure.ac: New option: --enable-pthread-cancel-probe Define
        EARLY_PTHREAD_CANCEL_PROBE to 1 if libgcc_s is present,
        * src/pound.c (main): when in chroot mode, if
        EARLY_PTHREAD_CANCEL_PROBE is defined, do a call to
        pthread_cancel prior to chrooting. This forces loading
        libgcc_s.so so that it remains available after chroot.

2023-03-28  Sergey Poznyakoff  <gray@gnu.org>

        Mark compatibility header dh.h as nodist

        * src/Makefile.am (nodist_pound_SOURCES): New variable.

2023-03-28  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix

        * src/Makefile.am (LDADD): Remove path spec from libpound.a

2023-03-28  Sergey Poznyakoff  <gray@gnu.org>

        Update the manpage.


2023-03-28  Sergey Poznyakoff  <gray@gnu.org>

        Fix the ACME statement when used together with RootJail.

        See https://github.com/graygnuorg/pound/issues/6

        * src/pound.h (be_acme): Remove the dir field. New field: wd
        (descriptor of the directory for challenges).
        * src/config.c (parse_acme): Open the acme directory early,
        before chroot is eventually is called.
        * src/http.c (acme_response): Use openat to open the challenge
        file.
        * src/svc.c: Reflect changes to struct be_acme.

2023-03-18  Sergey Poznyakoff  <gray@gnu.org>

        Include directive is allowed anyplace

        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * src/config.c (parse_statement, parse_acl): Allow for an
        "Include".

        * tests/Makefile.am: Add new test.
        * tests/testsuite.at: Include new test.
        * tests/inclscope.at: New test.

2023-03-18  Sergey Poznyakoff  <gray@gnu.org>

        Include directory setting takes effect after pushing first
        source

        This ensures a consistent behavior of -f

2023-03-18  Sergey Poznyakoff  <gray@gnu.org>

        List full pathname in diagnostic messages.

        * src/config.c (pathname_alloc): New function.
        (include_dir): New static.
        (open_include_dir,close_include_dir): Maintain include_dir
        value.
        (push_input): Improve diagnostic message.

2023-03-18  Sergey Poznyakoff  <gray@gnu.org>

        Compatibility fix

        * src/config.c (config_parse): Apply the default include
        directory setting only unless explicitly requested otherwise.

2023-03-13  Sergey Poznyakoff  <gray@gnu.org>

        Support for -file option to request matching directives.

        The -file option instructs the directive to treat its argument
        as the name of a file to read patterns from.

        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * src/config.c (open_include_dir, close_include_dir)
        (fopen_include): New functions.
        (input_open): Use fopen_include.
        (push_input): Use fstatat.
        (parse_match_mode): Support the -file option.
        (parse_cond_matcher): Rewrite taking into account eventual -file
        option and other subtleties.  All uses changed.
        (top_level_parsetab): New statement: IncludeDir.
        (feature): New feature: include-dir.
        (pound_settings): Add include directory.
        (config_parse): Use SYSCONFDIR as include directory by default.
        * src/extern.h (FEATURE_INCLUDE_DIR): New feature.
        * tests/fromfile.at: New test.
        * tests/include.at: New test.
        * tests/incldir.at: New test.
        * tests/inclnest.at: New test.
        * tests/Makefile.am: Add new files.
        * tests/testsuite.at: Include new tests.
        (PT_CONF): Pass the -W[no-]include-dir option to pound.
        * tests/poundharness.pl: New options: --preproc and
        --include-dir.
        (runner): Pass the -W[no-]include-dir option to pound.

2023-03-08  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix

        * src/pound.c (detach): Check return values from chdir, open,
        and dup.

2023-03-07  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.6


2023-03-07  Sergey Poznyakoff  <gray@gnu.org>

        Update the docs


2023-03-07  Sergey Poznyakoff  <gray@gnu.org>

        Housekeeping: github workflows


2023-03-07  Sergey Poznyakoff  <gray@gnu.org>

        Check the use of backends in services for correctness

        * NEWS: Document changes.
        * doc/pound.8: Document changes.
        * src/config.c (parse_service): Bail out if multiple special
        backends are used.  Emit a warning if multiple Redirect backends
        are used or if one or more redirects is mixed with regular
        backends.

        * tests/bemix.at: New test.
        * tests/Makefile.am: Add new test.
        * tests/testsuite.at: Include new test.
        * tests/balancing.at: Fix typo.

2023-03-06  Sergey Poznyakoff  <gray@gnu.org>

        Implement interleaved weighted round robin balancing strategy

        * src/config.c (POUND_DEFAULTS): New field: balancer.
        (parse_service): Initialize balancer.
        (service_parsetab,top_level_parsetab): New keyword: Balancer.
        * src/pound.h (BALANCER): New type.
        (SERVICE): New fields: max_pri, balancer, iwrr_round, iwrr_cur.
        (service_balancer_init): New proto.
        * src/svc.c (service_lb_init)
        (service_lb_select_backend): New functions. Use
        service_lb_select_backend instead of rand_backend everywhere.
        * tests/balancing.at: Use IWRR during testing.
        * tests/prio.at: Likewise.
        * tests/poundharness.pl: Used with stats request, index=N
        parameter requests the percentage of requests handled by Nth
        backend.

        * NEWS: Document new features.
        * doc/pound.8: Likewise.

2023-03-06  Sergey Poznyakoff  <gray@gnu.org>

        Fix typos in list macros

        * src/list.h (DLIST_INSERT_AFTER)
        (DLIST_INSERT_BEFORE): Use field argument instead of the
        hardcoded name.

2023-03-05  Sergey Poznyakoff  <gray@gnu.org>

        Avoid modulo bias


2023-03-03  Sergey Poznyakoff  <gray@gnu.org>

        Control maximum number of working threads


2023-03-03  Sergey Poznyakoff  <gray@gnu.org>

        Make sure "name" attribute is always present in the
        serialization of listener and service


2023-03-03  Sergey Poznyakoff  <gray@gnu.org>

        Identify listeners and services by their names (labels) as well
        as indices

        * src/config.c (parse_listen_http)
        (parse_listen_https): Handle optional listener name.  Make sure
        it is unique.
        (parse_service): Make sure service name is unique.
        * src/pound.h (LISTENER): New field: name.
        * src/poundctl.tmpl: Show listener name, if available.
        * svc.c (get_nth_listener, get_nth_service)
        (get_nth_backend,ctl_getnum): Remove.
        (IDENT): New data type.
        (ctl_getident,locate_listener,locate_service)
        (locate_backend): New functions.
        (service_serialize): Represent NULL service name as null.
        (listener_serialize): Add listener name.
        (ctl_service,ctl_listener): Identify objects by their ids or
        numbers.

        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * doc/poundctl.8: Likewise.

2023-03-02  Sergey Poznyakoff  <gray@gnu.org>

        Allocate service name as necessary


2023-02-28  Sergey Poznyakoff  <gray@gnu.org>

        Fix memory leak in add_forwarded_headers


2023-02-20  Sergey Poznyakoff  <gray@gnu.org>

        Enable buffering for plain HTTP backends

        * src/http.c (open_backend): Always push buffered BIO

2023-02-20  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.5.90


2023-02-20  Sergey Poznyakoff  <gray@gnu.org>

        Rewrite session handling

        * src/config.c: Remove struct service_session.  The session
        parameters are stored directly in the SERVICE object.
        * src/http.c (http_request_get_path)
        (http_header_list_locate_name, http_header_get_value): Now
        global.
        (http_request_rebuild_query): Accept parameters with NULL value. 
        Free the query field before assigning it.
        (match_cond): Return 0 if the parameter has NULL value.
        * src/pound.h (SERVICE): Remove sess_start and sess_pat.  New
        field: sess_id.
        (get_backend): Change signature.
        (upd_session): Change signature.
        (http_request_get_path)
        (http_header_list_locate_name, http_header_get_value): New
        protos.
        * src/svc.c: Rewrite session handling functions using http
        request and header functions.

2023-02-19  Sergey Poznyakoff  <gray@gnu.org>

        Don't decode request parts. Return 500 on string expansion
        errors.

        Mandatory percent decoding creates more problems than it solves.
        It can perhaps be used optionally in request matching, but that
        is left for further consideration.

        * doc/pound.8: Document changes.
        * src/http.c: Don't urldecode request parts.
        (expand_string_to_buffer): Return -1 if invalid barckreferences
        or accessors are encountered. Don't bail out on
        percent-encodings.
        (expand_string): Handle error return from
        expand_string_to_buffer.
        * src/pound.h (http_request): Remove storage for decoded values.

        * tests/poundharness.pl (getline): Handle undefined return
        graciously.
        (ParseRequest): Terminate thread on EOF.

        * tests/backref.at: Update expected values.
        * tests/experr.at: Likewise.
        * tests/lstset.at: Likewise.
        * tests/redirect.at: Likewise.
        * tests/reqacc.at: Likewise.
        * tests/set.at: Likewise.

2023-02-18  Sergey Poznyakoff  <gray@gnu.org>

        Changes in poundharness

        * tests/poundharness.pl: Run read_and_process in main thread. 
        Don't join threads on exit: all threads must be in detached
        state.
        (read_and_process): Rewrite. Start one thread per each backend. 
        Within it, use the traditional endless loop (accept && do).

2023-02-18  Sergey Poznyakoff  <gray@gnu.org>

        Fix percent encoding/decoding of the path part.

        Remove fragment handling: let's not meddle in the affairs of
        clients.

        * NEWS: Reflect changes.
        * doc/pound.8: Likewise.
        * src/pound.h (http_request): Remove frag_raw and frag. New
        field path_raw.
        * src/http.c (expand_string_to_buffer): Don't allow subject 
        indexes after compatibility references (%N).
        (urlencode): Take additional argument indicating whether the 
        string being encoded is a path.
        (http_request_rebuild_url): Use path_raw.
        (http_request_get_path): Decode path if necessary.
        (http_request_free): Free path_raw.
        * src/config.c: Remove fragment directives.
        * tests/backref.at: Expect encoded URI.
        * tests/experr.at: Likewise.
        * tests/lstset.at: Remove fragment tests.
        * tests/reqacc.at: Likewise.
        * tests/set.at: Likewise.

2023-02-18  Sergey Poznyakoff  <gray@gnu.org>

        Improve tests

        * src/http.c (expand_string_to_buffer): Improve error reporting.
        * tests/Makefile.am: Add new tests.
        * tests/testsuite.at: Likewise.
        * tests/poundharness.pl (process_http_request): Add x-orig- 
        headers when returning 404.
        * tests/backref.at: New file.
        * tests/experr.at: New file.
        * tests/header.at: New file.
        * tests/lstset.at: New file.
        * tests/not.at: Don't use obsolete/deprecated directives.
        * tests/or.at: Likewise.
        * tests/reqacc.at: Likewise.
        * tests/virthost.at: Likewise.

2023-02-17  Sergey Poznyakoff  <gray@gnu.org>

        Improve request matching and implement request modification
        directives.

        Implement request accessors. Test rewrite rules.

        Keep a cyclic queue of submatches

        Up to 8 recent matches can be referenced in arguments to request 
        modification directives.  The notation $N refers to the Nth sub- 
        expression of the most recent match.  The notation $N(M) refers 
        to the Nth subexpression of the Mth recent match (match indexes 
        are 0-based).  For compatibility with versions 4.4-4.5, %N is 
        taken to mean $N(1).

        * src/http.c: Rewrite http_request support.
        (match_cond): Move from svc.c. Add support for new condition
        types.
        (rewrite_apply): New function.
        (send_to_backend): Call rewrite_apply.
        (expand_string_to_buffer,expand_string): New function.
        (expand_url): Rewrite using expand_string_to_buffer.
        (urldecode,urlencode): New functions.
        (submatch_reset,submatch_queue_init)
        (submatch_queue_get,submatch_queue_push)
        (submatch_queue_free): New functions.
        (expand_string_to_buffer): Rewrite using submatch_queue.  All 
        uses changed. Implement request accessors. Fix dead loop
        occurring when invalid percent sequence is encountered.
        (match_cond): Change signature. Use submatch_queue_push to get
        new submatch slot each time it is needed.
        (rewrite_rule_check, rewrite_op_apply): Change signature. All
        uses changed.
        (expand_string_to_buffer): Support ${N} notation along with $N.
        Count accessor expansions in the return value.
        (send_to_backend): Apply listener's rewrite rules.
        (http_request_rebuild): Replace with three functions, invoked
        when needed: http_request_rebuild_line,
        http_request_rebuild_url, and http_request_rebuild_query.
        (http_header_list_filter): Bugfix: revert condition.
        * src/pound.c (pound_http_enqueue): Add explanatory comment.
        (pound_http_destroy): Call submatch_queue_free.
        * src/pound.h (query_param,QUERY_HEAD): New aggregate types.
        (http_request): New fields: path, query_raw, query, frag_raw, 
        frag, orig_request_line, flags.
        (be_redirect): Rename append_uri to has_uri, to avoid confusion.
        (COND_PATH,COND_QUERY,COND_QUERY_PARAM,COND_FRAG): New cond
        types.
        (query_param_match): New aggregate type.
        (SERVICE_COND): New union member: qp.
        (REWRITE_OP,REWRITE_OP_HEAD)
        (REWRITE_RULE_HEAD,REWRITE_RULE): New aggregate types.
        (SERVICE): New field: rewrite.
        (struct submatch): Subject is allocated, so remove the const 
        qualifier.
        (get_service): Simplify signature.
        (match_cond): New proto.
        (SMQ_SIZE): New constant.
        (submatch_queue): New struct.
        (submatch_free): Remove proto.
        (submatch_queue_free): New proto.
        (POUND_HTTP): Remove field sm. New field smq.
        (get_service): Change signature.
        (LISTENER): Remove head_off and add_header. New field: rewrite.
        (http_request): Replace "flags" field with "split". HRF_*
        constants removed as well.
        * src/svc.c (match_service,get_service): Change signature.
        * src/config.c (input): Remove field: ready. New fields: putback 
        and putback_index.
        (input_gettkn, input_putback): Rewrite putback handling. New
        block statement: Rewrite ... [Else ...] End New statements:
        Path, Query, QueryParam, Fragment, SetHeader, DeleteHeader,
        SetURL, SetPath, SetQuery, SetQueryParam, SetFragment. Remove
        "AND" and "OR" block statements (these were undocumented
        shortcuts for "Match AND" and "Match OR").
        (parse_header_remove): New function. Handles HeaderRemove
        (HeadRemove) keywords. HeaderAdd, and AddHeader are handled as
        synonyms of SetHeader. LISTENERs rewrite field. Fix formation of
        regular expression for matchers. Allow for "set" statements
        without enclosing Rewrite block.

        * tests/Makefile.am: Add new tests.
        * tests/testsuite.at: Likewise.
        * tests/chgvis.at: New file.
        * tests/reqacc.at: New file.
        * tests/rwchain.at: New file.
        * tests/set.at: New file.
        * tests/headrem.at: Rewrite test to catch eventual bugs in 
        http_header_list_filter.

        * NEWS: Document changes.
        * doc/pound.8: Likewise.

2023-02-12  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.5


2023-02-10  Sergey Poznyakoff  <gray@gnu.org>

        Implement metrics backend

        This backend type implements openmetrics telemetry endpoint.

2023-02-08  Sergey Poznyakoff  <gray@gnu.org>

        Update the poundctl.tmpl.5 manpage


2023-02-07  Sergey Poznyakoff  <gray@gnu.org>

        Arithmetic functions in templates

        * NEWS: Update.
        * src/tmpl.c: Implement arithmetic functions.
        * doc/poundctl.tmpl.5: Document arithmetic functions.
        * src/poundctl.tmpl: Convert times to milliseconds.

2023-02-05  Sergey Poznyakoff  <gray@gnu.org>

        Rename statistics fields


2023-02-05  Sergey Poznyakoff  <gray@gnu.org>

        Include standard deviation in the backend request statistics

        * src/http.c (backend_update_stats): Maintain average squared
        time per request.
        * src/pound.h (BACKEND): New field: sqavg;
        * src/poundctl.tmpl: Display number of requests and stddev.
        * src/svc.c (backend_stats_serialize): New function: build 
        backend statistics object.
        (backend_serialize): Call backend_stats_serialize.

2023-02-05  Sergey Poznyakoff  <gray@gnu.org>

        Always compile supervisor code


2023-02-05  Sergey Poznyakoff  <gray@gnu.org>

        Revamp logging functions

        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * src/config.c (config_parse): New options: -F, -e.
        * src/pound.c (vlogmsg): Moved from svc.c.  In verbose mode, log 
        to syslog as well (if requested).
        (logmsg): Moved from svc.c
        (abend): New function.
        (detach): New function.
        (main): Use detach to daemonize. Pass log_facility as third
        argument to openlog.
        * src/pound.h (abend): New proto.

2023-02-04  Sergey Poznyakoff  <gray@gnu.org>

        Bugfixes

        * src/config.c (parse_error_backend): Initialize local variable.
        * src/http.c (bio_http_reply_start): Don't use Content-Type:
        with HTTP 1.0
        (http_err_reply): Mark connection as closed.
        (error_response): Set response_code explicitly. Return 0 on
        success
        (required by the caller).

2023-02-04  Sergey Poznyakoff  <gray@gnu.org>

        Core statistics in the control output

        * src/pound.c (workers_serialize): New function.
        * src/pound.h (workers_serialize): New proto.
        * src/poundctl.tmpl: Output core statistics.
        * src/svc.c: Add core statistics.
        * NEWS: Reflect changes.

2023-02-03  Sergey Poznyakoff  <gray@gnu.org>

        Optionally maintain request timing statistics

        * src/config.c (top_level_parsetab): New statement: BackendStats
        * src/extern.h (enable_backend_stats): New extern.
        * src/http.c (backend_update_stats): New function.
        (do_http): Update stats.
        * src/pound.c (enable_backend_stats): New global.
        * src/poundctl.tmpl: Print average request processing time.
        * src/svc.c (backend_serialize): If backend stats are enabled, 
        add avg_request_time.

2023-02-03  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.4.90


2023-02-03  Sergey Poznyakoff  <gray@gnu.org>

        New special backend: Error

        * NEWS: Document changes.
        * doc/pound.8: Likewise.
        * src/config.c: New configuration directive: Error (Service
        section).
        * src/http.c (error_response): New function.
        (do_http): Handle the BE_ERROR backend type.
        * src/pound.h (BE_ERROR): New backend type.
        (struct be_error): New data type.
        (BACKEND): Add be_error field.
        (http_status_to_pound,pound_to_http_status): New protos.
        * src/svc.c: Handle the BE_ERROR backend type.

        * tests/error.at: New file.
        * tests/Makefile.am: Add new test.
        * tests/testsuite.at: Likewise.
        * tests/errfile.at: Pop the ERR501 define.

2023-02-03  Sergey Poznyakoff  <gray@gnu.org>

        Revamp the BACKEND structure as a union of specific backend
        types

        * src/pound.h (be_regular, be_redirect)
        (be_acme): New data types.
        (BACKEND): Pack type-specific fields into a union.
        * src/config.c: Reflect changes.
        * src/http.c: Likewise.
        * src/svc.c: Likewise.

2023-02-03  Sergey Poznyakoff  <gray@gnu.org>

        Support 303 and 308 redirection codes.


2023-02-02  Sergey Poznyakoff  <gray@gnu.org>

        Improve formatting of the error responses

        * src/http.c (HTTP_STATUS): New field: reason.
        (bio_err_reply): Format the default error page, unless non-NULL 
        content is given.
        (err_reply): Remove. All uses updated.
        * tests/errfile.at: Make custom page sufficiently distinct from 
        the default one.

2023-02-02  Sergey Poznyakoff  <gray@gnu.org>

        Bugfixes.

        * src/http.c (close_backend): New function.
        (select_backend): Avoid fd leaks if same backend as the
        currently active one is returned.
        (do_http): Remove useless initializations.

2023-02-01  Sergey Poznyakoff  <gray@gnu.org>

        Replace LONG with a special type (typedef) for holding content
        length values

        * src/config.c: Change handling of MaxRequest directive.
        * src/extern.h (CHUNK_HEAD): Remove extern.
        * src/http.c: Use CONTENT_LENGTH instead of LONG.
        (get_content_length): New function.  Use it to get the value of
        a content length from its string representation. Use 0 instead
        of L0, and NO_CONTENT_LENGTH instead of L_1.
        * src/pound.c: Remove CHUNK_HEAD.
        * src/pound.h (CONTENT_LENGTH): New typedef.
        (STRTOCLEN,PRICLEN): New defines.
        (NO_CONTENT_LENGTH): New define.
        (LONG,L0,L_1,STRTOL,ATOL,PRILONG): Remove.
        (POUND_HTTP): Change type of the res_bytes fields.
        (LISTENER): Change type of the max_req field.
        * src/svc.c (vlogmsg): serialize access to stdout and stderr.

2023-02-01  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix

        * src/pound.c (pound_http_dequeue): Keep track of the actual
        worker count.

2023-01-31  Sergey Poznyakoff  <gray@gnu.org>

        Use response code to decide about ws_state, content availability
        etc.

        * src/extern.h (RESP_SKIP, RESP_IGN): Remove.
        * src/pound.c: Likewise.
        * src/http.c (backend_response): Use response code alone,
        instead of relying on regexps.

2023-01-31  Sergey Poznyakoff  <gray@gnu.org>

        Move backend selection and backend handling code to separate
        functions.

        * src/http.c (redirect_response,acme_response)
        (http_log,backend_response): Simplify arguments.
        (bio_callback): Handle BIO_CB_FREE.
        (set_callback): Change signature. Allocate the callback
        argument. It will be freed by bio_callback.
        (send_to_backend): New function.
        (open_backend,select_backend): New functions.
        (do_http): Use send_to_backend and select_backend.
        * src/pound.h (POUND_HTTP): New fields: svc, backend,
        reneg_state.
        (control_response): Change signature.
        * src/svc.c (control_response): Simplify arguments.

2023-01-31  Sergey Poznyakoff  <gray@gnu.org>

        Fix missing extern


2023-01-30  Sergey Poznyakoff  <gray@gnu.org>

        Rename THR_ARG to POUND_HTTP.

        Queue management functions renamed accordingly:

        s/thr_arg_enqueue/pound_http_enqueue/g 
        s/thr_arg_dequeue/pound_http_dequeue/g 
        s/thr_arg_destroy/pound_http_destroy/g

2023-01-30  Sergey Poznyakoff  <gray@gnu.org>

        Move backend to client interaction into a separate function.

        * src/http.c (redirect_reply): Rename to redirect_response,
        change signature.
        (acme_reply): Rename to acme_response, change signature.
        (http_log): Change signature. Take all information from THR_ARG
        and backend.
        (backend_response): New function.
        (do_http): Move backend -> client part to backend_response, call 
        that function.
        * src/pound.h (THR_ARG): New fields: ws_state, no_cont,
        conn_closed, start_req, response_code, res_bytes.
        * src/svc.c (control_reply): Rename to control_response. Change 
        signature.

2023-01-26  Sergey Poznyakoff  <gray@gnu.org>

        Discontinue support for RPC over HTTP

        * NEWS: Document changes.
        * doc/pound.8: Document changes.
        * src/config.c (listener_parse_xhttp): Allowed range for xHTTP
        is now 0..3
        * src/http.c: Remove RPC over HTTP cruft.
        * src/pound.h: Likewise.
        * tests/xhttp.at: Remove related tests.

2023-01-26  Sergey Poznyakoff  <gray@gnu.org>

        Always use the same version in responses as the one in the
        request.

        * src/http.c (bio_http_reply_start,bio_http_reply)
        (bio_err_reply): New functions.
        (err_reply): Take THR_ARG* as arg 1. All uses updated.
        (redirect_reply): Use bio_http_reply to format response
        according to the HTTP version in request.
        (acme_reply): Use bio_http_reply_start for the same purpose.
        (force_http_10): New function.
        (do_http): Remove force_10 local.

2023-01-21  Sergey Poznyakoff  <gray@gnu.org>

        Fix typo in README.md


2023-01-20  Sergey Poznyakoff  <gray@gnu.org>

        Revise the README.md


2023-01-19  Sergey Poznyakoff  <gray@gnu.org>

        Fix recent version number in NEWS


2023-01-19  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.4


2023-01-19  Sergey Poznyakoff  <gray@gnu.org>

        Revise the docs


2023-01-19  Sergey Poznyakoff  <gray@gnu.org>

        Remove references to now not existing Apsis web page and
        address.


2023-01-19  Sergey Poznyakoff  <gray@gnu.org>

        Fix expansion of %0 in Host matcher.

        * src/http.c (expand_url): Fix subgroup range checking
        * src/pound.h (COND_HOST): New SERVICE_COND type.
        * src/config.c (parse_cond_host): Create COND_HOST node.
        * src/svc.c (match_cond): For COND_HOST, adjust subject and
        regmatch_t offset so they refer to the header value.

2023-01-19  Sergey Poznyakoff  <gray@gnu.org>

        Back-references to headers in Redirect and ACME statements

        * NEWS: Document changes.
        * doc/pound.8: Document changes.
        * doc/poundctl.tmpl.5: Spell check
        * src/config.c: Rewrite handling of URL, Header and Host
        directives.
        * src/http.c (expand_url): Assume sm points to an array of two
        struct submatch element. Treat $N as references to sm[SM_URL]
        and %N as references to sm[SM_HDR].
        * src/pound.c (thr_arg_destroy): Free both sm elements.
        * src/pound.h (struct submatch): New field: subject.
        (THR_ARG): Change type of sm.
        * src/svc.c (submatch_reset): Reset subject to NULL.
        (match_headers, match_cond): Rewrite submatch handling.
        * tests/redirect.at: Add new tests.
        * tests/url.at: Add new tests.

2023-01-18  Sergey Poznyakoff  <gray@gnu.org>

        Add "all" keyword to HeaderOption


2023-01-18  Sergey Poznyakoff  <gray@gnu.org>

        Revise header modification directives.

        * src/config.c (POUND_DEFAULTS): New field: header_options.
        (parse_header_options): New function.
        (listener_alloc): Initialize header_options.
        (http_parsetab, https_parsetab, top_level_parsetab): New
        directive: HeaderOption.
        * src/http.c (http_header_list_locate_name): New function.
        (http_header_list_append): Check if the header being added is
        already in the list.  If so, act as instructed by the "replace"
        argument.
        (http_header_list_append_list): Likewise.
        (add_forwarded_headers): New function.
        (do_http): Apply all header modifications after having selected
        the service.  First, canned headers are added, then user-defined
        headers added, then header removal directives are applied.
        * src/pound.h (http_header_list_append): Change signature.  All
        uses changed.

        * tests/Makefile.am: Add new tests.
        * tests/https.at: Remove unnecessary ClientCert directive.
        * tests/optfwd.at: New test.
        * tests/optorder.at: New test.
        * tests/optssl.at: New test.
        * tests/poundharness.pl: New variable expansions: LISTENER:PORT
        and LISTENER:IP.  Same for BACKEND.
        * tests/testsuite.at: Include new tests.

        * NEWS: Document changes.
        * doc/pound.8: Document changes.
        * configure.ac: Version 4.3.90

2023-01-17  Sergey Poznyakoff  <gray@gnu.org>

        Minor fixes


2023-01-17  Sergey Poznyakoff  <gray@gnu.org>

        Fix request parsing

        * src/pound.h (http_request): New fields: method, version, url.
        (cpURL): Remove.
        * src/http.c (http_request_free): Free url.
        (parse_http_request): Rewrite.
        (do_http): Document int variables. Remove url buffer.
        * src/svc.c (cpURL): Remove.

2023-01-17  Sergey Poznyakoff  <gray@gnu.org>

        Revert debugging changes


2023-01-16  Sergey Poznyakoff  <gray@gnu.org>

        Revise need_rewrite

        * src/http.c (do_http): Check for lstn->rewr_loc prior to
        calling need_rewrite.  Get rid of the loc_path buffer.
        (http_request_free): Free user.
        * src/svc.c (need_rewrite): Change signature.  Return a pointer
        to the path portion of the location, instead of copying it to a
        fixed-size buffer.  Don't modify the original location.

2023-01-16  Sergey Poznyakoff  <gray@gnu.org>

        Keep http-processing data in the structure passed to do_http.

        * src/pound.h (THR_ARG): Keep http-processing data during
        do_http.
        * src/http.c (listener_err_reply): Remove.
        (http_err_reply): New function,
        (add_ssl_headers): Change signature.
        (clean_all): Remove macro.
        (do_http): Rewrite using new THR_ARG fields.  Simplify error
        handling.
        (thr_http): Destroy arg after return from do_http.
        * src/pound.c (put_thr_arg): Rename to thr_arg_enqueue; change 
        signature.  All uses changed.
        (get_thr_arg): Rename to thr_arg_dequeue.  All uses changed.
        (thr_arg_destroy): New function.

2023-01-16  Sergey Poznyakoff  <gray@gnu.org>

        Switch to doubly-linked list storage for headers

        * src/config.c (append_string_line): Remove.
        (append_header): New function. Used for HeaderAdd statements.
        * src/http.c (qualify_header)
        (http_header_alloc,http_header_free)
        (http_header_change,http_header_copy_value)
        (http_header_get_value,http_header_list_append)
        (http_header_list_append_list,http_header_list_free)
        (http_header_list_remove,http_header_list_filter)
        (http_header_list_locate): New functions.
        (http_request_line,http_request_header_value)
        (http_request_host): Request accessors.
        (http_request_free,http_request_read): New functions.
        (get_headers): Remove.
        (get_user): Change signature.
        (http_log_0, http_log_1, http_log_2, http_log_3)
        (http_log_4, http_log_5, http_log): Simplify argument list. Take
        request and response (struct http_request *) instead of several
        textual arguments.  Retrieve data from both as needed.
        (http_request_send, add_ssl_headers): New functions.
        (do_http): Remove most fixed-size buffers.  Keep collected 
        request and response for as long as needed.
        * src/pound.h (MAXHEADERS): Remove.
        (http_header,http_request)
        (HTTP_HEADER_LIST): New data types.
        (http_header_list_append,http_request_free): New protos.
        (http_request_init): New inline function.
        (LISTENER): Rename add_head to add_header, change its type to
        HTTP_HEADER_LIST.
        (get_service,upd_session): Change signatures.
        (check_header): Remove.
        * src/svc.c (check_header): Remove.
        (match_headers,match_cond,match_service)
        (get_service,get_HEADERS,get_backend)
        (upd_session): Change signature.
        * tests/atlocal.in: Define PERL_HTTP_TINY_IPV4_ONLY.

2023-01-13  Sergey Poznyakoff  <gray@gnu.org>

        Change handling of the basic authorization header

        * src/pound.c (AUTHORIZATION): Remove. All uses changed.
        * src/http.c (get_user): New function.
        (do_http): Use get_user to extract user name from the header
        value.
        * src/pound.h (HEADER_ constants): Use enum.
        (HEADER_AUTHORIZATION): New constant.
        * src/svc.c (check_header): Handle "Authorization" header.

2023-01-13  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.3


2023-01-12  Sergey Poznyakoff  <gray@gnu.org>

        Ensure proper handling of memory allocation failures.

        * src/pound.h (stringbuf): New fields: nomem, err.
        (stringbuf_init): Change signature.
        (stringbuf_add, stringbuf_add_char, stringbuf_add_string)
        (stringbuf_vprintf, stringbuf_printf): Change return type.
        (stringbuf_err): New function.
        (xstringbuf_init, stringbuf_init_log): New functions.

        * src/json.h: Protect against double inclusion.
        * src/list.h: Likewise.

        * src/json.c (json_array_insert, json_array_append)
        (json_array_set, json_array_get): Bail out if any of input
        pointers is NULL.

        * src/mem.c (stringbuf_init): Change signature.  Second argument 
        supplies memory allocation failure hook (can be NULL).
        (stringbuf_expand): Static function.  Return error code.  Call 
        nomem handler on out of memory errors.
        (stringbuf_add_char, stringbuf_add, stringbuf_add_string)
        (stringbuf_vprintf): Use stringbuf_expand.  Return error code.
        (stringbuf_printf): Return error code.
        (stringbuf_set): Use stringbuf_expand.  Return NULL on memory
        failures.
        (stringbuf_finish): Fail if stringbuf error indication is set.

        * src/poundctl.c: Bail out on memory allocation failures.
        * src/tmpl.c: Likewise.
        * src/config.c: Likewise.

        * src/http.c: Use stringbuf_init_log.  Handle memory allocation 
        errors gracefully.
        * src/pound.c (lognomem): New function. During startup, use
        functions that exit on memory allocation failures. During normal
        operation, handle such failures gracefully.
        * src/svc.c (service_session_serialize, backend_serialize)
        (backends_serialize, service_serialize)
        (listener_serialize, pound_serialize)
        (send_json_reply, list_handler, disable_handler)
        (session_remove_handler, session_add_handler) : Handle memory
        allocation failures in stringbuf and json functions gracefully.

2023-01-11  Sergey Poznyakoff  <gray@gnu.org>

        Fix parsing of the certificate subject

        * src/config.c (get_subjectaltnames): Change signature. Assume 
        subjectAltNames may be partially filled.
        (https_parse_cert): Use X509_NAME_get_index_by_NID to parse
        subject.
        * src/pound.h (POUND_CTX): Change types of subjectAltNames
        (char*) and subjectAltNameCount (size_t).

2023-01-10  Sergey Poznyakoff  <gray@gnu.org>

        Manpage formatting fixes


2023-01-10  Sergey Poznyakoff  <gray@gnu.org>

        templates: Use is_empty in "if" clauses as well.

        * src/tmpl.c (is_true): Rewrite via is_empty.
        * doc/poundctl.tmpl.5: Reflect changes.
        * configure.ac: Raise patchlevel number
        * NEWS: Update.

2023-01-09  Sergey Poznyakoff  <gray@gnu.org>

        templates: allow for variable assignments in {{with}}

        * doc/Makefile.am (dist_man_MANS): Add poundctl.tmpl.5
        * doc/poundctl.tmpl.5: New file.
        * src/poundctl.tmpl: Implement xml output template.
        * src/tmpl.c (is_empty): New function.
        (tmpl_with): New structure.
        (tmpl_action_free): Handle TMPL_ACT_WITH separately.
        (tmpl_action_eval): Use is_empty when checking the pipeline
        value in with.  Inherit variables from the current environment. 
        When evaluating range, create temporary environment.
        (with_action_parser): Allow for optional variable assignment
        between
        {{with and }}.

2023-01-09  Sergey Poznyakoff  <gray@gnu.org>

        Fix some json attributes

        * src/svc.c (service_serialize): Rename "ads_pri" to "abs_pri"
        (fix typo).
        (listener_serialize): Rename "enabled" to "active" (for
        consistency).
        * src/poundctl.tmpl: Use "active" instead of "enabled".

2023-01-08  Sergey Poznyakoff  <gray@gnu.org>

        Update copyright years


2023-01-08  Sergey Poznyakoff  <gray@gnu.org>

        Improve template

        * src/poundctl.c (find_template_file): Initialize undefined
        variable.
        * src/poundctl.tmpl: Ignore extra newlines in else clauses.

2023-01-08  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix


2023-01-08  Sergey Poznyakoff  <gray@gnu.org>

        Fix template to support listener/service/backend specifications

        * doc/poundctl.8: Document changes.
        * src/config.c (print_version): Move to progname.c, with minor 
        changes.
        * src/pound.h (POUND_TMPL_PATH): Search for ~/.poundctl.tmpl
        first.
        (string_value_type, string_value): New types.
        (print_version): New proto.
        * src/poundctl.c: Change options names: -f supplies the pound 
        config file name, -t supplies the template file name.
        (command_add_session)
        (command_delete_session): Use templates.
        (usage): Print bug-reporting info.
        (find_template_file): Path can contain both directory and
        regular file names.
        (main): Support the -V option.
        * src/poundctl.tmpl: Implement heuristics to determine the kind 
        of object passed.
        * src/tmpl.c: New builtin functions: typeof and exists.

2023-01-07  Sergey Poznyakoff  <gray@gnu.org>

        Implement template engine for poundctl


2022-12-31  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix in poundctl

        * src/poundctl.c (print_services): Fix conditional to avoid 
        spurious error message.

2022-12-31  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.2


2022-12-27  Sergey Poznyakoff  <gray@gnu.org>

        Minor changes.

        * NEWS: Update.
        * src/json.c: Add missing checks for failed memory allocations.
        (json_memabrt): New global.  Points to a function that will be 
        invoked when an out-of-memory error occurs.
        * src/json.h (json_memabrt): New proto.

2022-12-22  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix


2022-12-22  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix

        * src/poundctl.c (print_services): Skip empty arrays.

2022-12-22  Sergey Poznyakoff  <gray@gnu.org>

        Rewrite http logging (access-style logs)

        * src/config.c (parse_session): Free string buffer.
        (parse_log_level): New function.  Make sure the provided log
        level value is between 0 and 5.
        * src/http.c (redirect_reply, copy_bin, acme_reply)
        (get_line, copy_chunks, bio_callback)
        (is_readable, get_headers): Remove superfluous const qualifiers.
        (http_log): New function. Single entry point for producing http
        logs.
        (do_http): Use http_log.
        * src/pound.h (timespec_cmp, timespec_sub): New inline
        functions.
        (str_be): Remove macro.  Redefine as function prototype.
        * src/svc.c (str_be): New function.

2022-12-20  Sergey Poznyakoff  <gray@gnu.org>

        Clean-up http status code usage


2022-12-19  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix

        * src/poundctl.c (xgets): Remove trailing \r\n

2022-12-19  Sergey Poznyakoff  <gray@gnu.org>

        Don't allow to disable control interface.


2022-12-19  Sergey Poznyakoff  <gray@gnu.org>

        Use REST API for control requests.

        * configure.ac: Check for ranlib.
        * doc/poundctl.8: Rewrite.
        * src/Makefile.am (libpound.a): New non-installable library.
        * src/config.c: Move memory management functions to mem.c
        (sess_type_to_str): New function.
        (listener_parse_xhttp): Set an integer verb class in the range 
        0-4
        (listener_alloc): Set verb class 0
        (parse_control_global): New function.  Define a special
        listener/ service/backend for handling control requests.
        * src/extern.h (ctrl_name,control_sock): Remove.
        * src/http.c (do_http): Parse HTTP request line into method, uri 
        and HTTP version. Handle control requests (backend type
        BE_CONTROL) separately.
        * src/json.c: New file.
        * src/json.h: New file.
        * src/mem.c: New file.
        * src/pound.c (ctrl_name,control_sock): Remove.
        (server): Don't start separate thr_control thread. Flush cleanup
        queue before exiting.
        * src/pound.h: HTTP method definitions.
        (BE_CONTROL): New backend type.
        (LISTENER): Change type of verb to int - a verb class number.
        (thr_control): Remove.
        (control_reply,pound_atexit,unlink_file): New proto.
        * src/poundctl.c: Rewrite from scratch.
        * src/svc.c: Rewrite control request processing from scratch.

2022-12-18  Sergey Poznyakoff  <gray@gnu.org>

        Fix the DLIST_REMOVE_HEAD macro


2022-12-16  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix


2022-12-16  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.1.90


2022-12-16  Sergey Poznyakoff  <gray@gnu.org>

        Redo periodic operation support

        The timer thread is rewritten completely in order to do periodic 
        operations (such as backend probing and session expiration) 
        precisely when needed and lower the incurred CPU usage.

        Timer thread now supports scheduling of arbitrary periodic jobs 
        and schedule editing.

        Whenever a backend is marked as dead, a periodic job is
        scheduled for "alive_to" seconds from the current time, which
        will probe the backend and either mark it as alive (if it
        responds) or reschedule itself for a later time (if it does
        not).  Thus, no unnecessary iterations over
        listeners/servers/backends occur.

        The "haport" feature has been removed, as I see no much use in
        it now.

        Sessions are kept on per-service basis in a combined structure 
        consisting of a hash table (to quickly look-up a session) and a
        doubly-linked list (to provide for session expiration). 
        Sessions within the latter are sorted by their expiration time. 
        A periodic job is scheduled to the expiration time of the first
        session in the list, i.e. the least recently used one.  When the
        job has removed the expired session, it reschedules itself to
        the expiration time of the next session (which becomes first in
        the list), if any.

        * src/list.h: Bugfixes.
        * src/pound.h (struct session): Replace last access time with 
        expiration time (struct timespec).
        (EXPIRE_TO, HOST_TO): Remove.
        (job_enqueue_unlocked, job_enqueue_after_unlocked)
        (job_enqueue, job_enqueue_after)
        (job_rearm_unlocked,job_rearm): New protos.
        (BACKEND): New field: service.  Remove field: resurrect,
        ha_addr.

        * src/svc.c: Revamp session support. Remove do_expire. Sessions
        are stored in per-service session tables and are ordered by
        their expiration time.  The expire_sessions periodic job is
        scheduled to the expiration time of the first session in the
        list, i.e. the least recently used one.
        (touch_be): New function.
        (kill_be): Enqueue the touch_be job if the backend went offline.
        (do_resurrect): Remove.
        (job_head, job_mutex, job_cond): New static.
        (job_enqueue_unlocked, job_enqueue_after_unlocked)
        (job_enqueue, job_enqueue_after): New functions.
        (thr_timer): Rewrite.

        * src/config.c (parse_service): Set pointer to the owner service 
        for each backend.
        * tests/config.at: Remove the haport check.

2022-12-15  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix

        * src/http.c (do_http): Use ai_addrlen==0 to check for not
        defined address.

2022-12-14  Sergey Poznyakoff  <gray@gnu.org>

        Add doubly-linked list macros.  Rewrite backend availability
        checking

        * src/list.h: New file.
        * src/Makefile.am: Add new file.
        * src/pound.h: Include list.h
        * src/svc.c (do_resurect): Rewrite.  Rename to do_resurrect.
        (session-related functions): Use DLIST_* macros.

2022-12-13  Sergey Poznyakoff  <gray@gnu.org>

        Rewrite timer thread.  Clean up unused vars.


2022-12-13  Sergey Poznyakoff  <gray@gnu.org>

        Use SSL_CTX_set_dh_auto when available


2022-12-13  Sergey Poznyakoff  <gray@gnu.org>

        Rewrite session tracking code

        * README.md: Update.
        * configure.ac: Check for librt.
        * src/config.c: Remove support for OpenSSL prior to 1.0 Move
        session hashing code to svc.c
        * src/http.c: Remove support for OpenSSL prior to 1.0.
        * src/pound.c: Likewise.
        * src/pound.h (TABNODE): Rename to SESSION. Remove contents
        field, replace it with backend. Link session into a doubly-linked
        list, ordered by access time (least recently used first).
        (SESSION_TABLE): New structure.
        (session_table_new): New function.
        (SERVICE): Change type of the "sessions" field to
        SESSION_TABLE*.
        * src/svc.c: Remove support for OpenSSL prior to 1.0 Rewrite
        session tracking.

2022-12-10  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.1


2022-12-10  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix

        * src/config.c (backend_parsetab): Restore missing "Disabled"
        keyword.

2022-12-09  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix

        * src/pound.c (active_threads_wait): Fix timeout calculation.

2022-12-09  Sergey Poznyakoff  <gray@gnu.org>

        Disable idle timeout for initial worker threads.


2022-12-09  Sergey Poznyakoff  <gray@gnu.org>

        Rework the worker model

        * NEWS: Document changes.
        * doc/pound.8: Document changes.
        * configure.ac: Version 4.0.90
        * src/config.c: New configuration parameters: WorkerMinCount, 
        WorkerMaxCount and WorkerIdleTimeout.
        * src/extern.h (numthreads): Remove.
        (worker_min_count, worker_max_count)
        (worker_idle_timeout): New externs.
        * src/http.c (thr_http): Return if get_thr_arg returns NULL.
        * src/pound.c (numthreads): Remove.
        (worker_min_count, worker_max_count)
        (worker_idle_timeout): New variables.
        (put_thr_arg): Start new worker if all existing workers are busy 
        and worker_max_count is not yet reached.
        (get_thr_arg): Return NULL if a spare thread remains idle for 
        too long.
        * src/pound.h (DEFAULT_NUMTHREADS): Remove.
        (DEFAULT_WORKER_MIN, DEFAULT_WORKER_MAX)
        (DEFAULT_WORKER_IDLE_TIMEOUT): New defines.

2022-12-09  Sergey Poznyakoff  <gray@gnu.org>

        New configuration directive: PIDFile


2022-12-08  Sergey Poznyakoff  <gray@gnu.org>

        Create PID file and have OpenSSL open /dev/urandom before
        chrooting


2022-12-08  Sergey Poznyakoff  <gray@gnu.org>

        Clean-up in the service matching code.

        This commit updates (and, partially, reverts) a816aada0f. The
        HeaderRequest and HeaderDeny, introduced in a816aada0f, are
        removed.  New statement "Header" is added as a replacement for 
        HeaderRequest.  The "HeadDeny" is implemented as "Not Header",
        which should really be used instead of it.

        * NEWS: Reflect changes.
        * doc/pound.8: Likewise.
        * README.md: Revise the docs.
        * src/config.c: The HeaderRequest and HeaderDeny, introduced in
        a816aada0f, are removed.  New statement "Header" is added as a
        replacement for HeaderRequest.
        * src/pound.h (BOOL_NOT): New constant.
        (COND_HDR_DENY): Remove.  Use a combination of
        COND_BOOL(BOOL_NOT) and COND_HDR to implement it.
        (COND_HDR_REQ): Rename to COND_HDR.
        (COND_COMPOUND): Rename to COND_BOOL.
        * src/svc.c (match_cond): Update accordingly.

2022-12-07  Sergey Poznyakoff  <gray@gnu.org>

        Bugfixes

        * NEWS: Update.
        * src/config.c (assign_log_facility): Check return value from 
        gettkn_expect_mask.
        * src/http.c (do_http): Fix logging the response code.

2022-12-07  Sergey Poznyakoff  <gray@gnu.org>

        New statement: Host


2022-12-07  Sergey Poznyakoff  <gray@gnu.org>

        New configuration keyword: "not"

        * NEWS: Document changes.
        * doc/pound.8: Document changes.
        * src/config.c: Fix ACL handling (ACL lists not needed after the
        previous commit). New keyword "not" negates the result of a
        request matching directive.
        * src/pound.h (ACL_REF): Remove.
        (ACL_HEAD): Change definition.
        (simple_service_cond): Remove unused data type.
        (COND_NEGATE): New condition type.
        (acl_list_match): Remove.
        (acl_match): New prototype.
        * src/svc.c (match_cond): Rewrite ACL handling. Handle
        COND_NEGATE.
        * tests/not.at: New test.
        * tests/Makefile.am: Add new test.
        * tests/testsuite.at: Add new test.

2022-12-07  Sergey Poznyakoff  <gray@gnu.org>

        Use logical operators to join request matching directives.

        * NEWS: Document changes.
        * doc/pound.8: Document changes.
        * src/config.c: Change parsing of the request matching
        directives.
        * src/pound.h (SERVICE_COND): New type.
        * src/svc.c (match_service): Rewrite.
        * tests/or.at: New test.
        * tests/Makefile.am: Add new test.
        * tests/testsuite.at: Likewise.

2022-12-06  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix

        * src/svc.c (match_headers): Upper limit is MAXHEADERS-1 because 
        this function is passed &headers[1]

2022-12-06  Sergey Poznyakoff  <gray@gnu.org>

        Add new test.

        * tests/headdeny.at: New test.
        * tests/Makefile.am: Add new test.
        * tests/testsuite.at: Likewise.
        * doc/pound.8: Fix typo.
        * src/svc.c (match_service): Minor fix.

2022-12-06  Sergey Poznyakoff  <gray@gnu.org>

        Alternative spelling for header matching/manipulation directives

        * NEWS: Document changes.
        * doc/pound.8: Document changes.
        * src/config.c (service_parsetab): New directives:
        "HeaderRequire" and "HeaderDeny", synonymous to "HeadRequire"
        and "HeadDeny", correspondingly.
        (http_parsetab,https_parsetab): New directives "HeaderRemove"
        and
        "HeaderAdd", synonymous to "HeadRemove" and "AddHeader",
        correspondingly.

2022-12-05  Sergey Poznyakoff  <gray@gnu.org>

        ACL support

        * NEWS: Document changes.
        * doc/pound.8: Document changes.
        * src/config.c: New statement "ACL", in global and service
        contexts.
        * src/pound.h (ACL, ACL_REF, ACL_HEAD): New aggregate types.
        (acl_list_match): New proto.
        (struct _service): New field: acl.
        (get_service): Change signature.
        * src/svc.c (get_service): Take source address as argument.  Use 
        acl_list_match.
        * src/http.c: Update calls to get_service.

2022-12-04  Sergey Poznyakoff  <gray@gnu.org>

        New service type: ACME

        The ACME service handles ACME HTTP-01 challenges.  It is defined
        as follows:

          ListenHTTP
           ACME "directory"

        Its argument specifies the directory where ACME challenges are
        stored.

        * NEWS: Document changes.
        * doc/pound.8: Document changes.
        * src/config.c (http_parsetab): New statement: Err404, ACME.
        * src/http.c (redirect_reply) Return HTTP status code.
        (acme_reply): New function.
        (do_http): Handle ACME challenge requests.
        * src/pound.h (SLIST_PUSH): Bugfix: initialize (ent)->field.
        (BACKEND_TYPE): New enum.
        (struct _backend): be_type: change type to BACKEND_TYPE.  All
        uses changed. New field: redir_code.
        * src/svc.c: Update.
        * tests/Makefile.am: Add new test.
        * tests/acme.at: New test.
        * tests/testsuite.at: Add new test.

2022-12-03  Sergey Poznyakoff  <gray@gnu.org>

        URL expansion in Redirect statement

        The URL argument to the Redirect statement can contain
        references to parenthesized subexpressions in the most recently
        matched URL statement of the enclosing Service.  References are
        of the form $N, where N is the number of the parenthesized
        subgroup.  To insert literal $ sign, use $$.

        * src/config.c (stringbuf_add): New function.
        (parse_service): Warn if service defines no backends.
        * src/http.c (expand_url): New function.
        (redirect_reply): Rewrite.  Expand subexpressions in the
        redirect URL.
        (clean_all): Free sm (struct submatch).
        (do_http): New variable sm keeps submatches obtained from
        matching the recent URL statement in the service.
        * src/pound.h (submatch): New data type.
        (get_service): Change signature.
        (stringbuf_add): New proto.
        * src/svc.c (match_service): Take pointer to struct submatch as
        fourth argument.  Fill it with submatches from the most recent
        matched URL.
        (get_service): Likewise. Fix iteration over headers.
        * tests/redirect.at: Test URL expansion in Redirect statements.
        * doc/pound.8: Document changes.
        * NEWS: Document changes.

2022-12-03  Sergey Poznyakoff  <gray@gnu.org>

        Fix redirection code

        * src/http.c (redirect_reply): Don't use %zu specifier.
        * tests/Makefile.am: Add new test.
        * tests/testsuite.at: Add new test.
        * tests/redirect.at: New test.

2022-12-03  Sergey Poznyakoff  <gray@gnu.org>

        Use sizeof to pass size of a buffer


2022-12-02  Sergey Poznyakoff  <gray@gnu.org>

        Version 4.0


2022-12-02  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix

        * src/http.c (redirect_reply): Don't use fixed-size buffers.
        This is mainly to avoid spurious compiler diagnostics and
        diminish stack usage.

2022-12-01  Sergey Poznyakoff  <gray@gnu.org>

        Various fixes

        * configure.ac: Change email address. Fix m4 quoting. Rewrite
        checks for libraries. Print status summary at the end of run.
        * doc/pound.8: Change email address.
        * doc/poundctl.8: Likewise.
        * src/Makefile.am (noinst_HEADERS): Remove stray entry.
        * src/config.c: Fix help output alignment.
        * src/http.c (do_http): Remove unnecessary debug message.
        * tests/https.at: Use 2048 bit RSA to prevent OpenSSL from 
        complaining.
        * tests/virthost.at: Likewise.

2022-12-01  Sergey Poznyakoff  <gray@gnu.org>

        Optionally disable DNS lookups

        * doc/pound.8: Document the -W option.
        * src/config.c: New option -W. Use -W no-dns to disable DNS
        lookups.
        * src/extern.h (feature_is_set): New prototype.
        * src/svc.c (get_host): Disable DNS lookups if FEATURE_DNS is
        unset.
        * tests/poundharness.pl: Use -Wno-dns.
        * tests/testsuite.at: Likewise.

2022-12-01  Sergey Poznyakoff  <gray@gnu.org>

        Switch to gnu strictness level


2022-12-01  Sergey Poznyakoff  <gray@gnu.org>

        Build README from README.md

        * .gitignore: Add README
        * Makefile.am: Add maintainer rules.  Build README.
        * README.md: Minor changes.
        * configure.ac: Test if we're building from cloned git repo.
        * md2txt.pl: New file.

2022-11-25  Sergey Poznyakoff  <gray@gnu.org>

        Add NEWS


2022-11-23  Sergey Poznyakoff  <gray@gnu.org>

        Revise pound.8


2022-11-23  Sergey Poznyakoff  <gray@gnu.org>

        Switch to deep directory structure


2022-11-23  Sergey Poznyakoff  <gray@gnu.org>

        Fix typo


2022-11-23  Sergey Poznyakoff  <gray@gnu.org>

        Tests for load balancing

        * tests/Makefile.am: Add new tests.
        * tests/testsuite.at: Likewise.
        * tests/poundharness.pl: Implement statistics mode.
        * tests/balancing.at: New file.
        * tests/prio.at: New file.
        * tests/sessauth.at: New file.
        * tests/sesscookie.at: New file.
        * tests/sesshdr.at: New file.
        * tests/sessip.at: New file.
        * tests/sessparm.at: New file.
        * tests/sessurl.at: New file.

2022-11-21  Sergey Poznyakoff  <gray@gnu.org>

        config: apply range limiting to the Priority value


2022-11-21  Sergey Poznyakoff  <gray@gnu.org>

        Remove superfluous typecasts


2022-11-21  Sergey Poznyakoff  <gray@gnu.org>

        Provide macros for printing pthread_t.  Other minor fixes.


2022-11-21  Sergey Poznyakoff  <gray@gnu.org>

        Fix typos in extract_cn and is_class


2022-11-21  Sergey Poznyakoff  <gray@gnu.org>

        Fix default configuration file pathname * config.c
        (config_parse): Remove superfluous SYSCONFDIR.


2022-11-20  Sergey Poznyakoff  <gray@gnu.org>

        Fix SocketFrom server/client interaction

        * pound.c (main): Don't try to create|bind|listen if the socket
        descriptor is not -1, i.e. if it has been obtained via
        SocketFrom
        * tests/poundharness.pl: listen on the created socket if it is
        going to be passed to pound.

2022-11-20  Sergey Poznyakoff  <gray@gnu.org>

        Rewrite list support using macros.

        * pound.h: Move externs to extern.h
        (SLIST_HEAD,SLIST_HEAD_INITIALIZER,SLIST_ENTRY)
        (SLIST_INIT,SLIST_PUSH,SLIST_SHIFT,SLIST_FOREACH)
        (SLIST_COPY,SLIST_FIRST,SLIST_EMPTY,SLIST_NEXT): New macros.
        (MATCHER, BACKEND, SERVICE)
        (POUND_CTX, LISTENER): Change type of the next field.
        (MATCHER_HEAD, BACKEND_HEAD, SERVICE_HEAD)
        (POUND_CTX_HEAD, LISTENER_HEAD): New aggregate types.
        * extern.h: New file.
        * Makefile.am (noinst_HEADERS): Add new files.
        * config.c: Include extern.h Use SLIST macros to manipulate
        lists.
        (parse_emergency): Only one emergency block is allowed.
        * http.c: Use SLIST macros to manipulate lists.
        * pound.c: Likewise.
        * svc.c: Likewise.
        * poundctl.c: Likewise.

        * tests/Makefile.am: Add new files.
        * tests/testsuite.at: Likewise.
        * tests/https.at: New file.
        * tests/virthost.at: New file.
        * tests/poundharness.pl: Add https support and regex matching
        for headers.

2022-11-19  Sergey Poznyakoff  <gray@gnu.org>

        Minor fixes in manpages


2022-11-19  Sergey Poznyakoff  <gray@gnu.org>

        Minor fixes

        * config.c (assign_port_internal): Fix hints initialization.
        * configure.ac: Version 4.0-rc1
        * README.md: Update.
        * pound.8: Update.
        * pound.h (_listener): Remove unused field disable_ssl_v2

2022-11-18  Sergey Poznyakoff  <gray@gnu.org>

        Reorganize documentation files


2022-11-18  Sergey Poznyakoff  <gray@gnu.org>

        Bugfixes

        * config.c (parser_loop): Don't modify call_data in the loop.
        (session_type_parser): Case-insensitive comparison.

2022-11-16  Sergey Poznyakoff  <gray@gnu.org>

        Improve configuration parser. Add two new tests.

        * config.c (parser_loop): Pass session data. All uses updated.
        (pound_defaults): Remove static variable.
        (parse_config_file): Initialize defaults in a static variable
        and pass a pointer to it as both call and session data to
        parser_loop.
        * pound.8: Fix typo.
        * pound.c: Remove leftover casts to void.
        * pound.h (logmsg,stringbuf_printf): Mark as printf-like,
        * tests/Makefile.am: Add new tests.
        * tests/testsuite.at: Add new tests.
        * tests/headrequire.at: New test.
        * tests/url.at: New test.
        * tests/poundharness.pl: Require Perl 5.26.3 or later (needed
        for sufficiently new HTTP::Tiny, with support for 'pear' request
        option). Minor fix in the END handler.

2022-11-16  Sergey Poznyakoff  <gray@gnu.org>

        Rewrite addr2str


2022-11-16  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix in configuration parser

        * config.c (input_gettkn): Fix recognition of literals that
        begin with identifier-like sequence (hostnames, in particular).
        (assign_address_internal): accept any token that has the str
        field initialized.

2022-11-16  Sergey Poznyakoff  <gray@gnu.org>

        Print compilation defaults on -V


2022-11-15  Sergey Poznyakoff  <gray@gnu.org>

        Remove deprecated and obsolescent checks from configure.ac


2022-11-15  Sergey Poznyakoff  <gray@gnu.org>

        Rewrite startup and shutdown sequence.  Rewrite supervisor.

        * config.c: New global statement: "Supervisor".
        * http.c (thr_http): Decrease active thread count upon return
        from do_http.
        * pound.8: Document changes.
        * pound.c: (enable_supervisor, n_listeners)
        (active_threads): New globals.
        (get_thr_arg): Increase active_threads.
        (active_threads_decr): New function.
        (active_threads_wait): New function. Move main
        listen-and-dispatch code into a separate thread. Rewrite
        supervisor and main.
        * pound.h (enable_supervisor): New extern.
        (active_threads_decr): New proto.

2022-11-15  Sergey Poznyakoff  <gray@gnu.org>

        Fix connection dequeuing


2022-11-15  Sergey Poznyakoff  <gray@gnu.org>

        manpage: consistently use "backend" instead of "back-end"


2022-11-15  Sergey Poznyakoff  <gray@gnu.org>

        Fix bugs in handling of MaxRequests and RewriteLocation; add
        more tests.

        MaxRequests: upon receiving too big a request, error 501 was
        returned, which is not appropriate.  Change this to return 413
        instead.  Introduced new listener statement to customize the
        error message.

        RewriteLocation: Minor bug in handling of the '1' value.  If
        location pointed to the listener with the wrong protocol, it was
        not rewritten.

        * config.c: New listener statement: Err413
        * http.c (h413): New variable.
        (do_http): Fix bug in max. request size handling: return 413, 
        instead of 510.
        * pound.h (_listener): New field: err413.
        * svc.c (need_rewrite): Fix listener protocol comparison.
        * pound.8: Document Err413
        * tests/Makefile.am: Add new tests.
        * tests/testsuite.at: Likewise.
        * tests/poundharness.pl: Fix cleanup after send. Headers (both
        request and expected) may contain variables:
        ${LISTENER[N]} and ${BACKEND[N]}. Header lines starting with
        dash mean that this header may not be present in the request. 
        Fix cleanup after send and content comparison. Add
        x-backend-ident header to the backend responses. New endpoint:
        /redirect
        * tests/config.at: Move definition of PT_CONF to testsuite.at
        * tests/addheader.at: New test.
        * tests/checkurl.at: New test.
        * tests/errfile.at: New test.
        * tests/headrem.at: New test.
        * tests/maxrequest.at: New test.
        * tests/rewriteloc.at: New test.
        * tests/xhttp.at: Remove erroneous comment.

2022-11-14  Sergey Poznyakoff  <gray@gnu.org>

        Add support for http testing.  Two new tests.

        * config.c: New statement: SocketFrom.
        * pound.8: Document the SocketFrom statement.
        * pound.c (main): Support UNIX sockets for listeners.
        * pound.h (stringbuf_finish): New proto.
        * tests/Makefile.am: Add new tests.
        * tests/testsuite.at: Likewise.
        * tests/atlocal.in (HARNESS): New variable.
        * tests/echo.at: New test.
        * tests/xhttp.at: New test.
        * tests/poundharness.pl: New auxiliary program.

2022-11-11  Sergey Poznyakoff  <gray@gnu.org>

        Introduce the testsuite


2022-11-09  Sergey Poznyakoff  <gray@gnu.org>

        Rewrite configuration file parser from scratch.  Proof-read the
        docs.

        Use simple recursive descent parser.  Improve error checking and
        reporting. Remove some arbitrary limits (e.g. read buffer size
        and number of include nesting).

2022-11-06  Sergey Poznyakoff  <gray@gnu.org>

        Minor fix


2022-11-06  Sergey Poznyakoff  <gray@gnu.org>

        Fix build for OpenSSL 3.x

        * configure.ac: Remove deprecated calls.  Remove checks for
        headers that are always present.  Check for OpenSSL version.
        * Makefile.am: Build dh*.h conditionally
        * pound.h: Include ISO C89 header files unconditionally.
        (RSA_tmp_callback, DH_tmp_callback): Remove.
        (POUND_SSL_CTX_init): New proto.
        * pound.c: Don't use RETSIGTYPE.
        (main): Disable supervisor if daemonize is off. Don't call
        init_timer: it is done in thr_timer now.
        * config.c: Use POUND_SSL_CTX_init for version-specific
        initialization. Disable SSLEngine statement for OpenSSL 3.0 and
        newer.
        * poundctl.c: Fix various buffer size issues. Always check
        returns from read and write.
        * http.c: Set BIO callback depending on OpenSSL version.
        * svc.c: Remove obsolete varargs cruft.
        (POUND_SSL_CTX_init): New function.
        (thr_timer): Call init_timer at start up.

2022-11-05  Sergey Poznyakoff  <gray@gnu.org>

        Minor changes

        * GPL.txt: Rename to COPYING
        * Makefile.am: Add EXTRA_DIST
        * z2_2_5_1.py: Remove.
        * z2_2_6_1.py: Remove.

2022-11-05  Sergey Poznyakoff  <gray@gnu.org>

        Use ax_pthread instead of its "decompiled" inline version

        * acinclude.m4: New file.
        * configure.ac: New file.

2022-11-05  Sergey Poznyakoff  <gray@gnu.org>

        Reindent sources


2020-01-24  Sergey Poznyakoff  <gray@gnu.org.ua>

        configure.ac: fix a typo in --with-dh option handling


2018-12-05  Sergey Poznyakoff  <gray@gnu.org>

        ws: use symbolic constants


2018-12-10  Sergey Poznyakoff  <gray@gnu.org>

        Update README;


2018-12-10  GitHub  <gray@gnu.org>

        Merge pull request #1 from patrodyne/master

        Added patch for WebSocket support.
2018-12-01  Rick O'Sullivan  <rick.osullivan@patrodyne.org>

        Added patch for WebSocket support.


2018-05-12  Sergey Poznyakoff  <gray@gnu.org>

        Version 2.8


2018-05-12  Sergey Poznyakoff  <gray@gnu.org>

        Remove support for multi-line headers (sync with uplink)

        * configure.ac: Remove the --enable-cert1l option.
        * config.c (config_parse): Likewise.
        * http.c (do_http) [CERT1L]: Remove useless buf argument in call 
        to BIO_printf. Remove #if condition.
        [!CERT1L]: Remove.
        * svc.c (check_header): Don't handle header continuations.

2018-04-21  Sergey Poznyakoff  <gray@gnu.org>

        Fix processing of the --enable-cert1l configuration option


2018-03-19  Sergey Poznyakoff  <gray@gnu.org>

        Bugfix

        * http.c: Stop if BIO_read returns <= 0

2018-03-03  Sergey Poznyakoff  <gray@gnu.org>

        Update the docs

        Add the bootstrap script.

2018-03-02  Sergey Poznyakoff  <gray@gnu.org>

        Make sure dh headers are rebuilt when needed

        * Makefile.am: Build dh.h by concatenating two dh headers.
        * configure.ac: Check if --with-dh gives acceptable key length.
        * .gitignore: Update.

2018-03-02  Sergey Poznyakoff  <gray@gnu.org>

        Minor cleanup

        * configure.ac: New subst variables SSL_CPPFLAGS and
        SSL_LDFLAGS. Avoid modifying CFLAGS directly, unless absolutely
        necessary.
        * Makefile.am: Use SSL_CPPFLAGS and SSL_LDFLAGS
        * config.c (get_subjectaltnames): Remove useless memory
        allocation.
        (IMPLEMENT_LHASH_HASH_FN,IMPLEMENT_LHASH_COMP_FN): Not needed 
        for OpenSSL version 1.1
        * http.c: Remove declarations of unused variables.
        * pound.c (l_init, l_id, l_lock): Not used in OpenSSL 1.1.
        Protect with #if. Remove declarations of unused variables.
        * pound.h (get_thr_qlen): Use explicit return type.
        * poundctl.c: Remove declarations of unused variables.
        * svc.c: Likewise.

2018-03-02  Sergey Poznyakoff  <gray@gnu.org>

        Fix the use of macros, following e0eac50c.

        * http.c: Change #ifdef to #if.
        [CERT1L]: Fix format in call to BIO_printf.
        * pound.c: Change #ifdef to #if.

2018-03-02  Sergey Poznyakoff  <gray@gnu.org>

        Define preprocessor symbols in config.h instead of the command
        line.

        Avoid duplicating symbols.

        Force specific ownership and privileges on the installed files
        only when installing them as root.

2018-03-01  Sergey Poznyakoff  <gray@gnu.org>

        Fix file modes.


2018-03-01  Sergey Poznyakoff  <gray@gnu.org>

        Convert Makefile.in to Makefile.am


2018-03-01  Sergey Poznyakoff  <gray@gnu.org>

        Restore configure.ac from configure

        Remove autogenerated files from the repository

2018-03-01  Sergey Poznyakoff  <gray@gnu.org>

        Update README


2018-02-28  Sergey Poznyakoff  <gray@gnu.org>

        Support for Openssl 1.1


2018-02-28  Sergey Poznyakoff  <gray@gnu.org>

        Initial commit


Local Variables:
mode: change-log
version-control: never
buffer-read-only: t
End:
