This change allows to reuse curl handles for multiple requests.
Reusing a curl handle improves performance if more than one request is
made against a service (connection, session cache, dns cache are kept
between requests).
This solves for the case where hosted RSS podcasts have self signed or
expired certs: using default (verify peer) in these instances results
in 'SSL peer certificate or SSH remote key was not OK'
ffmpeg/libav has been capable of this since approx 2016, so the fallback
functions can be dropped now.
Also means we don't add automatically add Icy-MetaData: 1 to request
headers any more.
An empty string will mean that m3u tags won't get used (unless m3u_override is
configured), but they should be used, since they are probably better than an
empty string.
Extends the http_client_ctx to hold the response code for a request.
Also adds the content type header, if it was a https request (using
libcurl instead of libevent)
encoded/converted. Characters above x7F were replaced by '?' character
although the rfc defines a ISO−8859−1 encoding for descriptive
field-content.
According to rfc2616 the field-content is defined as follows:
<the OCTETs making up the field-value and consisting of either *TEXT or
combinations of token, separators, and quoted-string>
The TEXT rule is only used for descriptive field contents and values
that are not intended to be interpreted by the message parser. Words of
*TEXT MAY contain characters from character sets other than ISO- 8859-1
only when encoded according to the rules of RFC 2047.
In the previous implementation the icy metadata was converted based on
fromcode "ascii".
Following incoming icy header field-values should be encoded as
"ISO−8859−1" before adding them to the metadata structure.
- misc.c unicode_fixup_string enhanced by an additional parameter to
define the fromcode
- misc.h unicode_fixup_string prototype updated
- filescanner.c function fixup_tags updated to stay compatible to the
previous implementation using fromcode "ascii"
- db.c function unicode_fixup_mfi updated to stay compatible to the
previous implementation using fromcode "ascii"
- http.c function metadata_header_get enhanced to encode the header
field-content as "ISO−8859−1" to comply with rfc2616