]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-http: http_client_request_add_header() - Replace existing header
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 27 May 2019 14:47:16 +0000 (17:47 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 10 Sep 2019 07:01:31 +0000 (10:01 +0300)
commitb762ffa1884918d81c922322654660a88dc2bd59
tree31f00d9eabe171773ce24e27a6957d655ac049aa
parent6b3d684a15dfd2d5e441751761552b0d6689c0d3
lib-http: http_client_request_add_header() - Replace existing header

If header with the same key already exists, just replace the value.
HTTP supports having multiple headers with the same key only when they
can be rewritten into a single comma-separated header. So practically
there's no reason for lib-http to need to support adding multiple
headers. Replacing an existing value is more useful generally.
src/lib-http/http-client-request.c
src/lib-http/http-client.h
src/lib-http/test-http-client-request.c