diff options
author | tron <tron> | 1999-05-01 09:55:32 +0000 |
---|---|---|
committer | tron <tron> | 1999-05-01 09:55:32 +0000 |
commit | 0eddbd328317a78f52ef4b8501050669c4ef9cfb (patch) | |
tree | 588da3091d3922d66b949301d05aa31963bcab8d /audio/mpg123 | |
parent | 87e73006a0c51b4d941b585fc9a4160baab95bbb (diff) | |
download | pkgsrc-0eddbd328317a78f52ef4b8501050669c4ef9cfb.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/mpg123')
-rw-r--r-- | audio/mpg123/patches/patch-ag | 40 |
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: + |