summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>1999-05-01 09:55:32 +0000
committertron <tron@pkgsrc.org>1999-05-01 09:55:32 +0000
commitcf67e1925a28e99ff3902671e3e73cbcde854e0a (patch)
tree588da3091d3922d66b949301d05aa31963bcab8d /audio
parent0a294a14a19e617106c774313b3d90dce1fbf53e (diff)
downloadpkgsrc-cf67e1925a28e99ff3902671e3e73cbcde854e0a.tar.gz
Add support for fetching files from name based virtual WWW servers.
Patch supplied by Michael Graff in PR pkg/7500.
Diffstat (limited to 'audio')
-rw-r--r--audio/mpg123/patches/patch-ag40
1 files changed, 40 insertions, 0 deletions
diff --git a/audio/mpg123/patches/patch-ag b/audio/mpg123/patches/patch-ag
new file mode 100644
index 00000000000..3dc577a86f3
--- /dev/null
+++ b/audio/mpg123/patches/patch-ag
@@ -0,0 +1,40 @@
+$NetBSD: patch-ag,v 1.1 1999/05/01 09:55:32 tron Exp $
+
+--- httpget.c Mon Nov 23 08:17:46 1998
++++ httpget.c Thu Apr 29 15:08:05 1999
+@@ -154,6 +154,7 @@
+ if (!(proxyurl = getenv("http_proxy")))
+ proxyurl = getenv("HTTP_PROXY");
+ if (proxyurl && proxyurl[0] && strcmp(proxyurl, "none")) {
++ host = NULL;
+ if (!(url2hostport(proxyurl, &host, &proxyip, &proxyport))) {
+ fprintf (stderr, "Unknown proxy host \"%s\".\n",
+ host ? host : "");
+@@ -184,18 +185,22 @@
+ myip = proxyip;
+ }
+ else {
++ host = NULL;
+ if (!(sptr = url2hostport(purl, &host, &myip, &myport))) {
+ fprintf (stderr, "Unknown host \"%s\".\n",
+ host ? host : "");
+ exit (1);
+ }
+- if (host)
+- free (host);
+ strcat (request, sptr);
+ }
+ sprintf (request + strlen(request),
+ " HTTP/1.0\r\nUser-Agent: %s/%s\r\n",
+ prgName, prgVersion);
++ if (host) {
++ sprintf(request + strlen(request),
++ "Host: %s:%u\r\n", host, myport);
++ free (host);
++ }
+ strcat (request, ACCEPT_HEAD);
+ strcat (request, "\r\n");
+ server.sin_family = AF_INET;
+>Audit-Trail:
+>Unformatted:
+