mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
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>
This commit is contained in:
parent
9bbe8f28f2
commit
443799b3ee
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=141195
2 changed files with 16 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
PORTNAME= mpg321
|
PORTNAME= mpg321
|
||||||
PORTVERSION= 0.2.10
|
PORTVERSION= 0.2.10
|
||||||
PORTREVISION= 4
|
PORTREVISION= 5
|
||||||
CATEGORIES= audio
|
CATEGORIES= audio
|
||||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||||
MASTER_SITE_SUBDIR= mpg321
|
MASTER_SITE_SUBDIR= mpg321
|
||||||
|
|
15
audio/mpg321/files/patch-network.c
Normal file
15
audio/mpg321/files/patch-network.c
Normal file
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue