Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Aug 2005 04:41:51 +0200
From:      Frank Ruell <stoerte@dreamwarrior.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        naddy@FreeBSD.org
Subject:   ports/84898: [patch] audio/mpg321 - provide an user-agent
Message-ID:  <E1E48Rb-000Azs-7M@sisyphos.foobar.ath.cx>
Resent-Message-ID: <200508140250.j7E2o2og068611@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         84898
>Category:       ports
>Synopsis:       [patch] audio/mpg321 - provide an user-agent
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 14 02:50:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Frank Ruell
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD sisyphos.foobar.ath.cx 5.4-STABLE FreeBSD 5.4-STABLE #1: Mon Aug 8 20:45:28 CEST 2005 root@sisyphos.foobar.ath.cx:/usr/obj/usr/src/sys/Sisyphos i386



>Description:
	Seems like some "SHOUTcast Distributed Network Audio Server" just
	disconnects you, when you don't provide an user-agent identification.


>How-To-Repeat:
	Try to listen, for example, to somafm's streams with mpg321 (and
	cross-check with mpg123).

	It shouldn't do harm to provide a user-agent, if it does one could make
	a knob for choosing the user-agent.  I will inform the author about it.


>Fix:
--- mpg321_user_agent.patch begins here ---
Sun Aug 14 04:01:34 CEST 2005  stoerte@dreamwarrior.net
  * provide an user-agent to make some SHOUTcast streaming servers happy
diff -rN -u old-mpg321/files/patch-network.c new-mpg321/files/patch-network.c
--- old-mpg321/files/patch-network.c	1970-01-01 01:00:00.000000000 +0100
+++ new-mpg321/files/patch-network.c	2005-08-14 04:13:33.000000000 +0200
@@ -0,0 +1,12 @@
+--- network.c~	Sun Mar 24 06:49:56 2002
++++ network.c	Sun Aug 14 03:54:23 2005
+@@ -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);
+ 


--- mpg321_user_agent.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1E48Rb-000Azs-7M>