Fixes: #2198
If there is a single "-" or it is only accompanied by whitespace, then
it wouldn't get escaped as it was detected as as a number. This would
produce invalid JSON.
This makes the numbers part ignore such and thus ensures it gets escaped
as text.
There might be other corner cases related to number parsing, this should be investigated.
https://github.com/doekman/xml2json-xslt/pull/20
Some numeric values would not get formatted to valid JSON. This
incorporates the suggestions from issue #15.
Also fixed whitespace of original patch.
Additional fix for related issue will follow.
This let util_url_escape() handle NULL passed as parameter.
In case the parameter is NULL it will also return NULL.
This patch also does some cleanup of the code such as migration
away from int and thus avoiding future failtures.
This is a re-apply of 3baa4e46aa
as git refuses to cherry-pick.
This is a first commit to correct minor problmes reported by
Denis Denisov. There is likely another commit to correct some more
such problems.
Thank you Denis Denisov.
This cleans the libcurl usage up a bit. It moves common code used
to interact with libcurl into a single new file curl.[ch].
Notes:
* It does not alter any features nor fixes any bugs.
* Thew REVIEW about strdup(self->url) in event_url.c as been processed.
According to the manpage for curl_easy_setopt()/CURLOPT_URL
there is no need for us to copy.
* URL Auth as well as URL triggers have sent ICECAST_VERSION_STRING
as User-Agent:, this has be corrected to what is set in the config
file.
* As curl.c is now a single point for setting parameters all the TLS
parameters should be reviewed and set (based on config).
Please test!
This allows to store a history of played songs along the source
object and report it as part of the status XML.
Additional work needs to be done to make this configurable.
Also format_mp3.c needs work to support this.
A generic song changed handler should be implemented to handle this
in a nice way.
That one should also be the point to call logging_playlist().
See: #766
This adds the operation mode "strict". It does not yet have
any specific features and alias the "normal" mode.
This change is mostly to make the setting of "strict" valid
so it can be used already.
As we do not support any SSL version but TLS this renames
all TLS related config options. Docs still need to be updated.
Close still uses 'ssl' internally e.g. for variable names.
This should be changed on a later patch.
This switches the behaviour introduced with the last commit
so that now the admin folder is only checked for includes if
in the specified path none is found.
This adds support for including xslt files that are in the admin
directory in an xslt file which is in the webroot, without having to
specify the full path.
For example:
<xsl:include href="includes/head.xsl"/>
will look inside the admin directory (foo/bar/admin/includes/header.xsl)
and include it, if it's found. If not it will as usual look for it in
the directory where the xslt file is located. This enables us to have
common files like the header, footer, json stuff, etc. in the admin
directory, so we don't need to have an extra copy in the web folder.
Note:
The configuration value for the admin directory is requested
every time an xslt is requested (if not in the cache).
Additonally it should be noted that the includes are not cached.
We haven't been using VS6 to build Icecast for a while.
We won't be bringing back the management UI, as everything is now
accessible through either web-ui or start menu.
Proper Windows service handling remains on todo list for 2.5.0.
This tries to unbreak the 100-continue thing a bit.
Proper headers are send in case of 100-continue. Also the 200 OK
was moved to the end of the stream.
The client may even be reused. But I'm not sure we only do
'End of stream' in cases we are not on an undefined state of the
client. Do we as of now support anything that give us EOS without
a fatal socket state (error or shutdown)?
At least this unbreaks 100-continue with active TLS that was broken
as hell as we sent the header in clear over the socket. Not checking
if it was transmitted completly or something. Using lowlevel socket
calls (in contrast to the connection level calls that would have
handled the TLS just fine).
While this seem sto be a huge improvement to the situation I kindly
ask you to do a lot testing on this. Both with SOURCE as well as
PUT clients.
We have answered SOURCE/PUT requests with a simple
"HTTP/1.0 200 OK\r\n\r\n" while we should answer with complet
headers. This commit corrects this.
Interoperability:
This will work for two classes of clients:
* Super dumb ones not checking the response and will just send
data and hope the socket is still open.
* Those with a real parser.
* Shoutcast clients (indepnded code path).
* All libshout, curl, wget, ... based clients.
This *could* break:
* Clients that check for the exact returned message. However
as we start with the same string this should work.
Only client that check for the string including the End-of-header
CRLF sequense may break.
Please test careful before release.
This exposes the TLS status as <tls> tag in the <listener> tag.
The tag contains a bool ("true" or "false"). TLS mode, version and
other parameters are out of the scope of this tag and may be added
as independed tags in later commits.
This allows the usage of RFC 2817 style upgrade commands.
This is not correctly announced yet.
Can hardly be tested as most clients do not support this.
Will be helpful with TLS support in libshout.
See: #2159, #2152