1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-15 04:08:06 -04:00
Commit Graph

50 Commits

Author SHA1 Message Date
Philipp Schafft
b42378abc4 Feature: Generate errors based on IDs.
This generates error pages based on IDs. This allows to reuse errors
and add more advanced information to them.

This patch also makes Icecast send in plain text OR HTML based
on the clients Accept:-string.
2018-05-07 16:28:46 +00:00
Philipp Schafft
5d603a01d8 Fix: Fixed a segfault when xsltApplyStylesheet() returns error 2018-05-05 06:42:42 +00:00
Marvin Scholz
eecbc647b4 Fix handling of URIs in custom XSL loader
There was an error how URIs were handled in our custom XSL loader
that rewrites include URIs to point to admin dir if the include
is not found in the current dir.

The check for the file would not work if the path contains chars
that are usually escaped in URIs, like a space (%20), as we get
a already encoded version of that URI in the loader and did not
decode it before checking the existence of the file.

(Fix #2249)
2016-01-26 10:13:07 +01:00
Philipp Schafft
5e8b24785e Fix: Use correct malloc function 2015-03-01 15:53:57 +00:00
Philipp Schafft
e870c21384 Cleanup: some style corrections. 2015-03-01 15:52:37 +00:00
Marvin Scholz
e0c05ef8a9 Fix another memory leak in xslt loader
This fixes another memory leak, which was caused by not freeing
the admin_path when a subsequent xslt file was loaded.
2015-03-01 15:35:14 +01:00
Marvin Scholz
06545b25c0 Fixed memory leaks in custom xslt loader
This fixes some memory leaks in the xslt loader,
additionally it now makes no copy of the URI if not needed.
2015-03-01 14:30:19 +01:00
Marvin Scholz
0709b4e66d Only look for admin include if no local found
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.
2015-02-25 16:11:42 +01:00
Marvin Scholz
5b416b311c Add support for 'admin' includes from web XSLT files
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.
2015-02-25 15:49:01 +01:00
Philipp Schafft
8941de3273 Fix: Added some more HTTP/1.1 headers
This adds to all responses:
 * "Accept-Encoding: identity"
 * "Connection: close"
 * "Allow: GET, SOURCE" or "Allow: GET" (on admin pages)

This is to generate some infrastructure for Icecast to tell futur
source clients what is supported.

"Upgrade: TLS/1.0" should be added later when upgrade support is present.

See: #2152
2015-02-01 11:56:03 +00:00
Philipp Schafft
11d5dffd49 Cleanup: Removed tailing spaces 2015-01-10 18:53:44 +00:00
Philipp Schafft
dc016bc017 Fix: Fixed compiler warnings
This fixes some compiler warnings. The code should be warning free
if gcc with -Wall is used but for the following:
{{{
admin.c: In function 'command_manageauth':
admin.c:790: warning: unused variable 'mountinfo'
}}}
This warning is due <role> migration. See #2123 for more details on
this warning. Please test with care. closes 2063
2014-12-14 19:18:22 +00:00
Marvin Scholz
1bf41cfdb6 Epic Git migration commit
Added .gitignore and submodules
Changed paths to match new location of things
2014-12-02 22:50:57 +01:00
Philipp Schafft
93194594f7 better coding style, patch by ePirat. refs #2059
svn path=/icecast/trunk/icecast/; revision=19376
2014-11-30 20:32:30 +00:00
Philipp Schafft
0df154f3bf remove client_send_[0-9]{3}() in favor of client_send_error(). Please test
svn path=/icecast/trunk/icecast/; revision=19344
2014-11-21 18:05:17 +00:00
ePirat
e7d68fd3b0 Move declarations to begin of block
(patch by Andreas Mieke)

svn path=/icecast/trunk/icecast/; revision=19318
2014-11-18 17:43:34 +00:00
ePirat
42f763bf37 Experimental fix for memory errors when using a lot of headers, see #1885
svn path=/icecast/trunk/icecast/; revision=19316
2014-11-18 10:17:16 +00:00
Philipp Schafft
d06b6b1846 patch to fix regression on header size with large headers introduced by support of <server-id> and <http-headers>. This should ensure we have at least space for 2kB of extra headers. Depending on function and call we may have much more space.
Please test this very carefully.
Some pointers what should be in the tests (NOT complet list):
- request to 'static' web/ and admin/ pages.
- requests to playlist generation.
- requests to streams.
- requests to admin/ manipulation functions.
- test everything with at least 8kB of extra headers, then reduce in 1kB (or 512B) steps.
- see if response is correct OR 500 is returned.
- run under valgrind or similar to see no buffer overflow or similiar will happen.
- take a cookie!

svn path=/icecast/trunk/icecast/; revision=19300
2014-11-10 10:46:55 +00:00
Philipp Schafft
9597e2eadd Added support for <http-headers> within <mount>. Also support merging of headers (normal mount + default mount). See #1885
svn path=/icecast/trunk/icecast/; revision=19269
2014-11-07 02:55:57 +00:00
Philipp Schafft
2b7cb1c641 LOG_{ERROR|WARN|INFO|DEBUG}() -> ICECAST_LOG_{ERROR|WARN|INFO|DEBUG}(); this is to avoid collision with LOG_INFO that is defined as part of syslog.
svn path=/icecast/trunk/icecast/; revision=19257
2014-10-31 08:46:58 +00:00
Philipp Schafft
7ae4664780 Replace the old logging macros with variadic argument macros. (patch by ePirat) (close #2058)
svn path=/icecast/trunk/icecast/; revision=19229
2014-10-09 10:39:13 +00:00
Thomas B. "dm8tbr" Ruecker
110a84146d Send charset in headers for everything, excluding file-serv and streams.
svn path=/icecast/trunk/icecast/; revision=19096
2014-02-23 21:29:35 +00:00
Philipp Schafft
91b49c583b use correct prototype.
svn path=/icecast/trunk/icecast/; revision=18645
2012-10-10 23:34:54 +00:00
Philipp Schafft
abf6c134d0 Send proper HTTP headers in responses to clients.
This is currently not implemented for SOURCE and STATS clients as
I suspect to break them. This needs some more research.
close #1639, see #1870 and #1885.

svn path=/icecast/trunk/icecast/; revision=18464
2012-07-17 23:55:09 +00:00
Karl Heyes
0868602bc0 win32 update. change build settings so that we make the process simpler, it
was very easy for the intermediate files to clash between projects.  The newer
libxml2/libxslt/libcurl also were causing some threading issues due to
library initialization


svn path=/icecast/trunk/icecast/; revision=14465
2008-02-11 01:00:41 +00:00
Karl Heyes
e065acb7f1 no functional/structural change but cleans up the annoying signed/unsigned pointer warnings
here with xmlChar, based on work originally done by gtgbr@gmx.net.
closes #783, #784, #785, #787

svn path=/icecast/trunk/icecast/; revision=13933
2007-10-04 16:48:38 +00:00
Karl Heyes
2a0c3cdefa Don't hardcode content type of xslt files to html, allow xsl to determine it
svn path=/icecast/trunk/icecast/; revision=13534
2007-08-11 00:24:51 +00:00
Michael Smith
37a6bb18d6 Patch from gtgbr@gmx.net to fix (void) function prototypes, with some minor
changes.


svn path=/icecast/trunk/icecast/; revision=10615
2005-12-17 12:23:09 +00:00
Karl Heyes
092c73b4a5 log xml/xslt parsing failure messages via error log. This applies to both the
xsl files and the icecast xml file when re-read. At icecast startup, the logs
are not open so these parsing messages still go to stderr.

svn path=/icecast/trunk/icecast/; revision=9758
2005-08-16 16:56:24 +00:00
Karl Heyes
61267a308b make sure that older xslt libs on non-win32 can be used as well
svn path=/icecast/trunk/icecast/; revision=9739
2005-08-12 03:27:09 +00:00
oddsock
afae729cbb xlst function so that win32 can use an older version of libxslt...
svn path=/icecast/trunk/icecast/; revision=9729
2005-08-11 20:31:13 +00:00
Karl Heyes
6ccda03842 some xslt related fixes. A small memory leak, a socket not closing on odd
case, and truncate the buffer length so that junk chars are not sent back.

svn path=/icecast/trunk/icecast/; revision=9547
2005-07-04 20:11:15 +00:00
Karl Heyes
e9adc91bee make admin and web root pages use file serving thread to send back responses
svn path=/icecast/trunk/icecast/; revision=9464
2005-06-18 10:54:53 +00:00
Karl Heyes
19cb11cc31 merge in a few fixes and cleanups I've accumulated in my branch.
svn path=/icecast/trunk/icecast/; revision=9152
2005-04-18 14:32:26 +00:00
Michael Smith
bada4b1c41 Make a debug message into a warning message, so it'll be logged more often
(since it's useful), and make it print out the file that it failed to find,
so that users can figure out what to do.


svn path=/icecast/trunk/icecast/; revision=8934
2005-02-16 00:54:55 +00:00
Karl Heyes
df919a9691 only unlock when we have finished with the stylesheet, potential race otherwise
svn path=/icecast/trunk/icecast/; revision=8723
2005-01-11 16:36:34 +00:00
oddsock
c0a79970f9 remove depricated include file
svn path=/icecast/trunk/icecast/; revision=8510
2004-12-21 19:23:35 +00:00
Karl Heyes
3026e1d089 small cleanups. fix buffer sizing, const and unused struct member
svn path=/icecast/trunk/icecast/; revision=8104
2004-10-26 14:21:36 +00:00
Michael Smith
0aad6d849c Add Copyright notice to each source file, as requested by debian.
svn path=/trunk/httpp/; revision=5792
2004-01-29 01:02:12 +00:00
brendan
a434767c34 Mike's #include patch
svn path=/trunk/icecast/; revision=5170
2003-07-24 05:24:00 +00:00
Karl Heyes
43953202a2 refer to cfgfile.h instead of config.h for icecast.xml, and use config.h
for autoconf

svn path=/trunk/icecast/; revision=5156
2003-07-21 01:58:54 +00:00
Karl Heyes
508d25641d avoid header namespace clashes
svn path=/trunk/icecast/; revision=5146
2003-07-16 19:41:59 +00:00
Michael Smith
3b2df1d0d9 Brendan was getting pissed off about inconsistent indentation styles.
Convert all tabs to 4 spaces. All code must now use 4 space indents.

svn path=/trunk/avl/; revision=4492
2003-03-15 02:10:19 +00:00
Michael Smith
d218eedf9a Plug several small memory leak, and one huge one in the xslt output code
svn path=/trunk/icecast/; revision=4174
2002-12-29 14:06:20 +00:00
Michael Smith
2e21e899c9 Minor incompatible change to relaying, to match actual protocol.
svn path=/trunk/icecast/; revision=4169
2002-12-29 09:21:32 +00:00
Michael Smith
5a60e7c09d Cache-checking is case-insensitive on win32.
svn path=/trunk/icecast/; revision=3811
2002-08-13 13:53:07 +00:00
Michael Smith
b68b01f02c Cache stylesheets for transforming.
svn path=/trunk/icecast/; revision=3810
2002-08-13 12:46:45 +00:00
Michael Smith
bf0f2e1414 rename transformXSLT to xslt_transform() for consistency with the rest
of the source.

svn path=/trunk/icecast/; revision=3781
2002-08-09 14:38:42 +00:00
Michael Smith
6357936028 Various cleanups for accounting of sent bytes.
Crash bug in stats fixed.

svn path=/trunk/icecast/; revision=3779
2002-08-09 14:15:08 +00:00
Michael Smith
0ecb66895a Add new xslt files, which I forgot earlier
svn path=/trunk/icecast/; revision=3775
2002-08-09 08:16:51 +00:00