| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: http.c,v 1.38 2016/02/08 13:27:42 jperkin Exp $ */ | | 1 | /* $NetBSD: http.c,v 1.39 2016/10/20 21:21:25 joerg Exp $ */ |
2 | /*- | | 2 | /*- |
3 | * Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav | | 3 | * Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav |
4 | * Copyright (c) 2003 Thomas Klausner <wiz@NetBSD.org> | | 4 | * Copyright (c) 2003 Thomas Klausner <wiz@NetBSD.org> |
5 | * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org> | | 5 | * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org> |
6 | * All rights reserved. | | 6 | * All rights reserved. |
7 | * | | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | | 8 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions | | 9 | * modification, are permitted provided that the following conditions |
10 | * are met: | | 10 | * are met: |
11 | * 1. Redistributions of source code must retain the above copyright | | 11 | * 1. Redistributions of source code must retain the above copyright |
12 | * notice, this list of conditions and the following disclaimer | | 12 | * notice, this list of conditions and the following disclaimer |
13 | * in this position and unchanged. | | 13 | * in this position and unchanged. |
14 | * 2. Redistributions in binary form must reproduce the above copyright | | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -709,27 +709,27 @@ http_authorize(conn_t *conn, const char | | | @@ -709,27 +709,27 @@ http_authorize(conn_t *conn, const char |
709 | | | 709 | |
710 | /* | | 710 | /* |
711 | * Connect to the correct HTTP server or proxy. | | 711 | * Connect to the correct HTTP server or proxy. |
712 | */ | | 712 | */ |
713 | static conn_t * | | 713 | static conn_t * |
714 | http_connect(struct url *URL, struct url *purl, const char *flags, int *cached) | | 714 | http_connect(struct url *URL, struct url *purl, const char *flags, int *cached) |
715 | { | | 715 | { |
716 | conn_t *conn; | | 716 | conn_t *conn; |
717 | int af, verbose; | | 717 | int af, verbose; |
718 | #if defined(TCP_NOPUSH) && !defined(__APPLE__) | | 718 | #if defined(TCP_NOPUSH) && !defined(__APPLE__) |
719 | int val; | | 719 | int val; |
720 | #endif | | 720 | #endif |
721 | | | 721 | |
722 | *cached = 1; | | 722 | *cached = 0; |
723 | | | 723 | |
724 | #ifdef INET6 | | 724 | #ifdef INET6 |
725 | af = AF_UNSPEC; | | 725 | af = AF_UNSPEC; |
726 | #else | | 726 | #else |
727 | af = AF_INET; | | 727 | af = AF_INET; |
728 | #endif | | 728 | #endif |
729 | | | 729 | |
730 | verbose = CHECK_FLAG('v'); | | 730 | verbose = CHECK_FLAG('v'); |
731 | if (CHECK_FLAG('4')) | | 731 | if (CHECK_FLAG('4')) |
732 | af = AF_INET; | | 732 | af = AF_INET; |
733 | #ifdef INET6 | | 733 | #ifdef INET6 |
734 | else if (CHECK_FLAG('6')) | | 734 | else if (CHECK_FLAG('6')) |
735 | af = AF_INET6; | | 735 | af = AF_INET6; |