[icecast] Patch to add User-Agent to libshout
Brendan Cully
brendan at xiph.org
Thu Jul 24 03:25:23 UTC 2003
Hmm, thanks. But
1. Libshout already sends the user-agent header. Look down a few
lines.
2. There's even a public API for setting the value of that header
(shout_set_agent).
On Monday, 21 July 2003 at 00:23, Dale Ghent wrote:
>
> Just a nifty thing to have for icecast server access logs... diff
> against CVS HEAD is attached.
>
> Index: configure.in
> ===================================================================
> RCS file: /usr/local/cvsroot/libshout/configure.in,v
> retrieving revision 1.65
> diff -u -r1.65 configure.in
> +++ configure.in 21 Jul 2003 04:20:22 -0000
> @@ -65,7 +65,7 @@
> ;;
> esac
> else
> - XIPH_CFLAGS="-Wall -ffast-math -fsigned-char"
> + XIPH_CFLAGS="-Wall -ffast-math -fsigned-char -DVERSION=${SHOUT_VERSION}"
> AC_DEFINE(_GNU_SOURCE, ,[Define if you have POSIX and GNU specifications])
> DEBUG="-g"
> PROFILE="-pg -g"
> Index: src/shout.c
> ===================================================================
> RCS file: /usr/local/cvsroot/libshout/src/shout.c,v
> retrieving revision 1.48
> diff -u -r1.48 shout.c
> +++ src/shout.c 21 Jul 2003 04:20:22 -0000
> @@ -756,7 +756,7 @@
> char *auth;
> char *ai;
>
> - if (!sock_write(self->socket, "SOURCE %s HTTP/1.0\r\n", self->mount))
> + if (!sock_write(self->socket, "SOURCE %s HTTP/1.0\r\nUser-Agent: libshout/%s\r\n", self->mount, VERSION))
> return SHOUTERR_SOCKET;
>
> if (self->password && (auth = http_basic_authorization(self))) {
>
>
>
> /ek
> http://elektronkind.org/
> Psytrance: it's post-grad school for ravers.
--- >8 ----
List archives: http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Icecast
mailing list