From 0eddbd328317a78f52ef4b8501050669c4ef9cfb Mon Sep 17 00:00:00 2001 From: tron Date: Sat, 1 May 1999 09:55:32 +0000 Subject: Add support for fetching files from name based virtual WWW servers. Patch supplied by Michael Graff in PR pkg/7500. --- audio/mpg123/patches/patch-ag | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 audio/mpg123/patches/patch-ag (limited to 'audio/mpg123/patches') 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: + -- cgit v1.2.3