diff options
author | naddy <naddy@FreeBSD.org> | 2005-08-29 04:39:25 +0800 |
---|---|---|
committer | naddy <naddy@FreeBSD.org> | 2005-08-29 04:39:25 +0800 |
commit | 53397dbdce9ea941d21d2153cb3e2f895485b6df (patch) | |
tree | 709b70638f830385f0f0f9becd5a50db2571c8a9 /audio | |
parent | 748c39f156fd580a81355faf67a4b6a94d339439 (diff) | |
download | freebsd-ports-gnome-53397dbdce9ea941d21d2153cb3e2f895485b6df.tar.gz freebsd-ports-gnome-53397dbdce9ea941d21d2153cb3e2f895485b6df.tar.zst freebsd-ports-gnome-53397dbdce9ea941d21d2153cb3e2f895485b6df.zip |
Provide "User-Agent" header in HTTP requests.
SHOUTcast Distributed Network Audio Server disconnects clients that
don't provide a user agent identification.
PR: 84898
Submitted by: Frank Ruell <stoerte@dreamwarrior.net>
Diffstat (limited to 'audio')
-rw-r--r-- | audio/mpg321/Makefile | 2 | ||||
-rw-r--r-- | audio/mpg321/files/patch-network.c | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/audio/mpg321/Makefile b/audio/mpg321/Makefile index 86dd7eabefca..d977989fbc92 100644 --- a/audio/mpg321/Makefile +++ b/audio/mpg321/Makefile @@ -7,7 +7,7 @@ PORTNAME= mpg321 PORTVERSION= 0.2.10 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= audio MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= mpg321 diff --git a/audio/mpg321/files/patch-network.c b/audio/mpg321/files/patch-network.c new file mode 100644 index 000000000000..c61006bc9d31 --- /dev/null +++ b/audio/mpg321/files/patch-network.c @@ -0,0 +1,15 @@ + +$FreeBSD$ + +--- network.c.orig ++++ network.c +@@ -225,7 +225,8 @@ + * a html page and not the stream */ + snprintf(http_request, sizeof(http_request), "GET /%s HTTP/1.0\r\n" + /* "User-Agent: Mozilla/2.0 (Win95; I)\r\n" */ +- "Pragma: no-cache\r\n" "Host: %s\r\n" "Accept: */*\r\n" "\r\n", filename, host); ++ "User-Agent: mpg321/%s\r\n" ++ "Pragma: no-cache\r\n" "Host: %s\r\n" "Accept: */*\r\n" "\r\n", filename, VERSION, host); + + send(tcp_sock, http_request, strlen(http_request), 0); + |