aboutsummaryrefslogtreecommitdiffstats
path: root/WWW/Library/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library/Implementation')
-rw-r--r--WWW/Library/Implementation/HTAccess.c2
-rw-r--r--WWW/Library/Implementation/HTAccess.h18
-rw-r--r--WWW/Library/Implementation/HTGopher.c2
-rw-r--r--WWW/Library/Implementation/HTParse.c28
-rw-r--r--WWW/Library/Implementation/HTTCP.c3
-rw-r--r--WWW/Library/Implementation/SGML.c41
-rw-r--r--WWW/Library/Implementation/tcp.h4
7 files changed, 66 insertions, 32 deletions
diff --git a/WWW/Library/Implementation/HTAccess.c b/WWW/Library/Implementation/HTAccess.c
index 52a18870..1f00a089 100644
--- a/WWW/Library/Implementation/HTAccess.c
+++ b/WWW/Library/Implementation/HTAccess.c
@@ -200,7 +200,7 @@ GLOBALREF HTProtocol HTWAIS;
** Use "*" to override all proxy service:
** no_proxy="*"
*/
-PRIVATE BOOL override_proxy ARGS1(
+PUBLIC BOOL override_proxy ARGS1(
CONST char *, addr)
{
CONST char * no_proxy = getenv("no_proxy");
diff --git a/WWW/Library/Implementation/HTAccess.h b/WWW/Library/Implementation/HTAccess.h
index f0c7e794..78685f8d 100644
--- a/WWW/Library/Implementation/HTAccess.h
+++ b/WWW/Library/Implementation/HTAccess.h
@@ -92,7 +92,23 @@ extern BOOL HTSecure; /* Disable security holes? */
extern HTStream* HTOutputStream; /* For non-interactive, set this */
extern HTFormat HTOutputFormat; /* To convert on load, set this */
-
+/* Check for proxy override. override_proxy()
+**
+** Check the no_proxy environment variable to get the list
+** of hosts for which proxy server is not consulted.
+**
+** no_proxy is a comma- or space-separated list of machine
+** or domain names, with optional :port part. If no :port
+** part is present, it applies to all ports on that domain.
+**
+** Example:
+** no_proxy="cern.ch,some.domain:8001"
+**
+** Use "*" to override all proxy service:
+** no_proxy="*"
+*/
+extern BOOL override_proxy PARAMS((
+ CONST char * addr));
/*
diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c
index 84fc9e9a..c4f47b76 100644
--- a/WWW/Library/Implementation/HTGopher.c
+++ b/WWW/Library/Implementation/HTGopher.c
@@ -1550,7 +1550,7 @@ PUBLIC int HTLoadCSO ARGS4(
status = parse_cso_fields(buf, sizeof(buf));
if (status) {
NETCLOSE(s);
- if (status = HT_INTERRUPTED) {
+ if (status == HT_INTERRUPTED) {
_HTProgress ("Connection interrupted.");
} else if (buf[0] != '\0') {
HTAlert(buf);
diff --git a/WWW/Library/Implementation/HTParse.c b/WWW/Library/Implementation/HTParse.c
index 223bbf5b..16f39fc7 100644
--- a/WWW/Library/Implementation/HTParse.c
+++ b/WWW/Library/Implementation/HTParse.c
@@ -271,6 +271,8 @@ PUBLIC char * HTParse ARGS3(
*/
{
char *p, *h;
+ if ((p = strchr(result, '@')) != NULL)
+ tail = (p + 1);
p = strchr(tail, ':');
if (p != NULL && !isdigit((unsigned char)p[1]))
/*
@@ -281,15 +283,23 @@ PUBLIC char * HTParse ARGS3(
/*
** Port specified.
*/
- if ((!strcmp(access, "http" ) && !strcmp(p, ":80" )) ||
- (!strcmp(access, "gopher") && !strcmp(p, ":70" )) ||
- (!strcmp(access, "ftp" ) && !strcmp(p, ":21" )) ||
- (!strcmp(access, "wais" ) && !strcmp(p, ":210")) ||
- (!strcmp(access, "nntp" ) && !strcmp(p, ":119")) ||
- (!strcmp(access, "news" ) && !strcmp(p, ":119")) ||
- (!strcmp(access, "snews" ) && !strcmp(p, ":563")) ||
- (!strcmp(access, "finger") && !strcmp(p, ":79" )) ||
- (!strcmp(access, "cso" ) && !strcmp(p, ":105")))
+ if ((!strcmp(access, "http" ) && !strcmp(p, ":80" )) ||
+ (!strcmp(access, "https" ) && !strcmp(p, ":443")) ||
+ (!strcmp(access, "gopher" ) && !strcmp(p, ":70" )) ||
+ (!strcmp(access, "ftp" ) && !strcmp(p, ":21" )) ||
+ (!strcmp(access, "wais" ) && !strcmp(p, ":210")) ||
+ (!strcmp(access, "nntp" ) && !strcmp(p, ":119")) ||
+ (!strcmp(access, "news" ) && !strcmp(p, ":119")) ||
+ (!strcmp(access, "newspost" ) && !strcmp(p, ":119")) ||
+ (!strcmp(access, "newsreply" ) && !strcmp(p, ":119")) ||
+ (!strcmp(access, "snews" ) && !strcmp(p, ":563")) ||
+ (!strcmp(access, "snewspost" ) && !strcmp(p, ":563")) ||
+ (!strcmp(access, "snewsreply") && !strcmp(p, ":563")) ||
+ (!strcmp(access, "finger" ) && !strcmp(p, ":79" )) ||
+ (!strcmp(access, "telnet" ) && !strcmp(p, ":23" )) ||
+ (!strcmp(access, "tn3270" ) && !strcmp(p, ":23" )) ||
+ (!strcmp(access, "rlogin" ) && !strcmp(p, ":513")) ||
+ (!strcmp(access, "cso" ) && !strcmp(p, ":105")))
*p = '\0'; /* It is the default: ignore it */
}
if (p == NULL) {
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index 2754803e..c8809dc4 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -462,6 +462,8 @@ PUBLIC int HTParseInet ARGS2(
fprintf (stderr, "*** INTERRUPTED gethostbyname.\n");
kill(fpid , SIGKILL);
FREE(host);
+ close(pfd[0]);
+ close(pfd[1]);
return HT_INTERRUPTED;
}
/*
@@ -479,6 +481,7 @@ PUBLIC int HTParseInet ARGS2(
else
cstat = read(pfd[0], (void *)&sin->sin_addr , cstat);
close(pfd[0]);
+ close(pfd[1]);
}
if (sin->sin_addr.s_addr == 0) {
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index 32ba06b8..c20801f6 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -819,9 +819,16 @@ top:
if (sscanf(string->data, "%d", &value) == 1) {
if (value == 8482) {
/*
- ** trade Treat as reg. - FM
+ ** trade Handle as named entity. - FM
*/
- value = 174;
+ string->size = 0;
+ HTChunkPutc(string, 't');
+ HTChunkPutc(string, 'r');
+ HTChunkPutc(string, 'a');
+ HTChunkPutc(string, 'd');
+ HTChunkPutc(string, 'e');
+ context->state = S_entity;
+ goto top;
}
/*
** Show the numeric entity if the value:
@@ -847,27 +854,25 @@ top:
** ensp, emsp or thinsp. - FM
*/
PUTC(2);
- break;
- }
- if (value == 8211 || value == 8212) {
+ } else if (value == 8211 || value == 8212) {
/*
** ndash or mdash. - FM
*/
PUTC('-');
- break;
+ } else {
+ /*
+ ** Unhandled or llegal value. Recover the "&#"
+ ** and digit(s), and recycle the terminator. - FM
+ */
+ PUTC('&');
+ PUTC('#');
+ string->size--;
+ for (i = 0; i < string->size; i++) /* recover */
+ PUTC(string->data[i]);
+ string->size = 0;
+ context->state = S_text;
+ goto top;
}
- /*
- ** Unhandled or llegal value. Recover the "&#"
- ** and digit(s), and recycle the terminator. - FM
- */
- PUTC('&');
- PUTC('#');
- string->size--;
- for (i = 0; i < string->size; i++) /* recover */
- PUTC(string->data[i]);
- string->size = 0;
- context->state = S_text;
- goto top;
} else if (value == 160) {
/*
** Use Lynx special character for 160 (nbsp). - FM
diff --git a/WWW/Library/Implementation/tcp.h b/WWW/Library/Implementation/tcp.h
index d4b00b38..99b63224 100644
--- a/WWW/Library/Implementation/tcp.h
+++ b/WWW/Library/Implementation/tcp.h
@@ -455,9 +455,9 @@ Regular BSD unix versions
#include <sys/timeb.h>
#include <time.h>
#endif /* SCO */
-#ifdef AIX
+#if defined(AIX) || defined(SVR4)
#include <time.h>
-#endif /* AIX */
+#endif /* AIX || SVR4 */
#include <sys/time.h> /* independent */
#include <sys/stat.h>
#include <sys/param.h>