http.c (112081) | http.c (112797) |
---|---|
1/*- 2 * Copyright (c) 2000 Dag-Erling Co�dan Sm�rgrav 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2000 Dag-Erling Co�dan Sm�rgrav 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/lib/libfetch/http.c 112081 2003-03-11 08:20:58Z des $"); | 30__FBSDID("$FreeBSD: head/lib/libfetch/http.c 112797 2003-03-29 15:15:38Z des $"); |
31 32/* 33 * The following copyright applies to the base64 code: 34 * 35 *- 36 * Copyright 1997 Massachusetts Institute of Technology 37 * 38 * Permission to use, copy, modify, and distribute this software and --- 657 unchanged lines hidden (view full) --- 696} 697 698static struct url * 699_http_get_proxy(const char *flags) 700{ 701 struct url *purl; 702 char *p; 703 | 31 32/* 33 * The following copyright applies to the base64 code: 34 * 35 *- 36 * Copyright 1997 Massachusetts Institute of Technology 37 * 38 * Permission to use, copy, modify, and distribute this software and --- 657 unchanged lines hidden (view full) --- 696} 697 698static struct url * 699_http_get_proxy(const char *flags) 700{ 701 struct url *purl; 702 char *p; 703 |
704 if (strchr(flags, 'd') != NULL) | 704 if (flags != NULL && strchr(flags, 'd') != NULL) |
705 return (NULL); 706 if (((p = getenv("HTTP_PROXY")) || (p = getenv("http_proxy"))) && 707 (purl = fetchParseURL(p))) { 708 if (!*purl->scheme) 709 strcpy(purl->scheme, SCHEME_HTTP); 710 if (!purl->port) 711 purl->port = _fetch_default_proxy_port(purl->scheme); 712 if (strcasecmp(purl->scheme, SCHEME_HTTP) == 0) --- 446 unchanged lines hidden --- | 705 return (NULL); 706 if (((p = getenv("HTTP_PROXY")) || (p = getenv("http_proxy"))) && 707 (purl = fetchParseURL(p))) { 708 if (!*purl->scheme) 709 strcpy(purl->scheme, SCHEME_HTTP); 710 if (!purl->port) 711 purl->port = _fetch_default_proxy_port(purl->scheme); 712 if (strcasecmp(purl->scheme, SCHEME_HTTP) == 0) --- 446 unchanged lines hidden --- |