about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2015-12-18 01:42:15 -0500
committerThomas E. Dickey <dickey@invisible-island.net>2015-12-18 01:42:15 -0500
commit2bfd7597b7533894c71385f833a91b3d88ee8506 (patch)
treec5e57e760cd5428bd5c9af6dd56af47c784897ce /WWW/Library/Implementation
parent8ab37dfd02e89e899872656c31264789f82deb34 (diff)
downloadlynx-snapshots-2bfd7597b7533894c71385f833a91b3d88ee8506.tar.gz
snapshot of project "lynx", label v2-8-9dev_6r
Diffstat (limited to 'WWW/Library/Implementation')
-rw-r--r--WWW/Library/Implementation/HTTP.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index 6a6eb2fc..61725f0d 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTP.c,v 1.149 2015/12/17 02:00:47 tom Exp $
+ * $LynxId: HTTP.c,v 1.150 2015/12/18 01:20:22 tom Exp $
  *
  * HyperText Tranfer Protocol	- Client implementation		HTTP.c
  * ==========================
@@ -17,8 +17,6 @@
 #include <HTNews.h>
 #endif
 
-#define HTTP_VERSION	"HTTP/1.1"
-
 #define HTTP_PORT   80
 #define HTTPS_PORT  443
 #define SNEWS_PORT  563
@@ -1172,7 +1170,9 @@ static int HTLoadHTTP(const char *arg,
     }
     if (extensions) {
 	BStrCat0(command, " ");
-	BStrCat0(command, HTTP_VERSION);
+	BStrCat0(command, ((HTprotocolLevel == HTTP_1_0)
+			   ? "HTTP/1.0"
+			   : "HTTP/1.1"));
     }
 
     BStrCat0(command, crlf);	/* CR LF, as in rfc 977 */
@@ -1186,7 +1186,9 @@ static int HTLoadHTTP(const char *arg,
 	    HTBprintf(&command, "Host: %s%c%c", host, CR, LF);
 	    FREE(host);
 	}
-	HTBprintf(&command, "Connection: close%c%c", CR, LF);
+	if (HTprotocolLevel >= HTTP_1_1) {
+	    HTBprintf(&command, "Connection: close%c%c", CR, LF);
+	}
 
 	if (!HTPresentations)
 	    HTFormatInit();