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>2013-10-14 00:13:37 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2013-10-14 00:13:37 -0400
commited46d3cc0121dbce87345bbbb119cd4080c247c7 (patch)
treec34bdd611f309476e5c1c1d7b72bf43236b522fb /WWW/Library/Implementation
parentf1977d62c94d74a72d1c7a4abbbecdec21e3980e (diff)
downloadlynx-snapshots-ed46d3cc0121dbce87345bbbb119cd4080c247c7.tar.gz
snapshot of project "lynx", label v2-8-8dev_16q
Diffstat (limited to 'WWW/Library/Implementation')
-rw-r--r--WWW/Library/Implementation/HTTCP.c4
-rw-r--r--WWW/Library/Implementation/HTTP.c30
2 files changed, 14 insertions, 20 deletions
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index 42514ad3..35680a12 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTCP.c,v 1.126 2013/07/21 00:22:52 tom Exp $
+ * $LynxId: HTTCP.c,v 1.127 2013/10/13 23:42:55 tom Exp $
  *
  *			Generic Communication Code		HTTCP.c
  *			==========================
@@ -1384,8 +1384,6 @@ static int HTParseInet(SockA * soc_in, const char *str)
 
 	    if (!phost)
 		goto failed;
-	    if (!phost)
-		goto failed;
 	    if (phost->h_length != sizeof soc_in->sin_addr) {
 		HTAlwaysAlert(host, gettext("Address length looks invalid"));
 	    }
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index 19016457..5176ceb8 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTP.c,v 1.131 2013/10/02 14:33:32 tom Exp $
+ * $LynxId: HTTP.c,v 1.132 2013/10/13 23:30:26 tom Exp $
  *
  * HyperText Tranfer Protocol	- Client implementation		HTTP.c
  * ==========================
@@ -1285,31 +1285,29 @@ static int HTLoadHTTP(const char *arg,
 
 		host2 = HTParse(docname, "", PARSE_HOST);
 		path2 = HTParse(docname, "", PARSE_PATH | PARSE_PUNCTUATION);
-		if (host2) {
-		    if ((colon = HTParsePort(host2, &port2)) != NULL) {
-			/* Use non-default port number */
-			*colon = '\0';
-		    }
+		if ((colon = HTParsePort(host2, &port2)) != NULL) {
+		    /* Use non-default port number */
+		    *colon = '\0';
 		}
+
 		/*
 		 * This composeAuth() does file access, i.e., for the ultimate
 		 * target of the request.  - AJL
 		 */
 		auth_proxy = NO;
-		if ((auth = HTAA_composeAuth(host2, port2, path2,
-					     auth_proxy)) != NULL &&
-		    *auth != '\0') {
+		auth = HTAA_composeAuth(host2, port2, path2, auth_proxy);
+		if (auth == NULL) {
+		    CTRACE((tfp, "HTTP: Not sending authorization (yet).\n"));
+		} else if (*auth != '\0') {
 		    /*
-		     * If auth is not NULL nor zero-length, it's an
-		     * Authorization header to be included.  - FM
+		     * We have an Authorization header to be included.
 		     */
 		    HTBprintf(&command, "%s%c%c", auth, CR, LF);
 		    CTRACE((tfp, "HTTP: Sending authorization: %s\n", auth));
-		} else if (auth && *auth == '\0') {
+		} else {
 		    /*
-		     * If auth is a zero-length string, the user either
-		     * cancelled or goofed at the username and password prompt.
-		     * - FM
+		     * The user either cancelled or made a mistake with the
+		     * username and password prompt.
 		     */
 		    if (!(traversal || dump_output_immediately) &&
 			HTConfirm(CONFIRM_WO_PASSWORD)) {
@@ -1330,8 +1328,6 @@ static int HTLoadHTTP(const char *arg,
 			status = HT_NOT_LOADED;
 			goto done;
 		    }
-		} else {
-		    CTRACE((tfp, "HTTP: Not sending authorization (yet).\n"));
 		}
 		/*
 		 * Add 'Cookie:' header, if it's HTTP or HTTPS document being