about summary refs log tree commit diff stats
path: root/WWW
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2009-05-22 00:47:41 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2009-05-22 00:47:41 -0400
commit097b356f6a8fa667d38dd10bb3bca016a7cc4f03 (patch)
tree15595038b1c48a2649417c1293df7185a0fbeb12 /WWW
parent01859149e85a589e236b320b01197e79c422a729 (diff)
downloadlynx-snapshots-097b356f6a8fa667d38dd10bb3bca016a7cc4f03.tar.gz
snapshot of project "lynx", label v2-8-7pre_2b
Diffstat (limited to 'WWW')
-rw-r--r--WWW/Library/Implementation/HTTP.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index 7d8e8601..3b3a2d2c 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTP.c,v 1.107 2009/04/07 22:45:42 tom Exp $
+ * $LynxId: HTTP.c,v 1.108 2009/05/22 00:47:41 tom Exp $
  *
  * HyperText Tranfer Protocol	- Client implementation		HTTP.c
  * ==========================
@@ -1158,18 +1158,20 @@ static int HTLoadHTTP(const char *arg,
 	    HTBprintf(&command, "Cache-Control: no-cache%c%c", CR, LF);
 	}
 
-	if (LYUserAgent && *LYUserAgent) {
-	    char *cp = LYSkipBlanks(LYUserAgent);
+	if (LYSendUserAgent || no_useragent) {
+	    if (!isEmpty(LYUserAgent)) {
+		char *cp = LYSkipBlanks(LYUserAgent);
 
-	    /* Won't send it at all if all blank - kw */
-	    if (*cp != '\0')
-		HTBprintf(&command, "User-Agent: %.*s%c%c",
-			  INIT_LINE_SIZE - 15, LYUserAgent, CR, LF);
-	} else {
-	    HTBprintf(&command, "User-Agent: %s/%s  libwww-FM/%s%c%c",
-		      HTAppName ? HTAppName : "unknown",
-		      HTAppVersion ? HTAppVersion : "0.0",
-		      HTLibraryVersion, CR, LF);
+		/* Won't send it at all if all blank - kw */
+		if (*cp != '\0')
+		    HTBprintf(&command, "User-Agent: %.*s%c%c",
+			      INIT_LINE_SIZE - 15, LYUserAgent, CR, LF);
+	    } else {
+		HTBprintf(&command, "User-Agent: %s/%s  libwww-FM/%s%c%c",
+			  HTAppName ? HTAppName : "unknown",
+			  HTAppVersion ? HTAppVersion : "0.0",
+			  HTLibraryVersion, CR, LF);
+	    }
 	}
 
 	if (personal_mail_address && !LYNoFromHeader) {