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
title='author Kartik K. Agaram <vc@akkartik.com> 2016-03-21 02:25:52 -0700 committer Kartik K. Agaram <vc@akkartik.com> 2016-03-21 02:25:52 -0700 2803' href='/akkartik/mu/commit/034call.cc?h=main&id=acc4792d2f7c787aad064876a1eb2d00bdf076b2'>acc4792d ^
f1e953d0 ^
ec926027 ^




363be37f ^
b24eb476 ^
ca01193d ^
363be37f ^
50eab110 ^



1fa53058 ^


ec926027 ^
31401373 ^
ec926027 ^



ca01193d ^
363be37f ^
69e14325 ^
5eb49929 ^
e2240eb4 ^

363be37f ^
77cdc6d0 ^

dd2e01e4 ^
77cdc6d0 ^

31401373 ^
d72f3799 ^
0b0cfb6f ^
7284d503 ^
67573caf ^
d41955c1 ^
67573caf ^


7284d503 ^

d41955c1 ^

31401373 ^
67573caf ^
ec926027 ^
d41955c1 ^

31401373 ^
795f5244 ^
ec926027 ^
58a08ed3 ^




d41955c1 ^

31401373 ^
1fa53058 ^


d41955c1 ^
795f5244 ^
dcfca05e ^
f89378d5 ^
2142ccfc ^

f3760b0f ^
2b250717 ^
2142ccfc ^

f1a6f323 ^
9cf71627 ^
5810092d ^
513bfed8 ^




2142ccfc ^
77cdc6d0 ^

dd2e01e4 ^
77cdc6d0 ^

012d2ee1 ^
af085cf6 ^




3eeea0a2 ^

9cf71627 ^
5f98a10c ^

1ead3562 ^
2cb36cd0 ^

2b37bbea ^
2cb36cd0 ^

5f98a10c ^
1ead3562 ^
192d59d3 ^
2cb36cd0 ^
2b37bbea ^
2cb36cd0 ^
7284d503 ^
64cf0a59 ^
d41955c1 ^

69e14325 ^
df8bb4c3 ^
f6d47435 ^
d41955c1 ^

31401373 ^
795f5244 ^
5eb49929 ^

317c0a34 ^
ec926027 ^

ac0e9db5 ^
2e8c5d39 ^
77cdc6d0 ^
dd2e01e4 ^
77cdc6d0 ^


31401373 ^
d8c6265d ^
9fdda88b ^
5f98a10c ^
8eff7919 ^
f6d47435 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173