lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV Patch for proper default port trimming in the v2.7 release


From: Foteos Macrides
Subject: LYNX-DEV Patch for proper default port trimming in the v2.7 release
Date: Wed, 19 Feb 1997 19:26:46 -0500 (EST)

        Patch for the February 15, 1997 Lynx v2.7 release to:
        
        (1) Reset the host string after an '@', if present, when trimming
default ":port" fields in the new code aimed at compliance with the Masinter
and Fielding URL drafts, expected to replace RFCs 1738 and 1808.  The
distributed code neglected to do that, and was ending up on a ":password"
field, if present, instead of on the ":port" field.

        (2) Expand the default port trimming so as to include all of the
registered URL schemes which support a port field in the v2.7 release.

                                Fote

=========================================================================
 Foteos Macrides            Worcester Foundation for Biomedical Research
 address@hidden         222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================

*** lynx2-7/WWW/Library/Implementation/HTParse.c_ori    Thu Feb  6 16:28:40 1997
--- lynx2-7/WWW/Library/Implementation/HTParse.c        Wed Feb 19 16:42:14 1997
***************
*** 271,276 ****
--- 271,278 ----
            */
            {
                char *p, *h;
+               if ((p = strchr(result, '@')) != NULL)
+                  tail = (p + 1);
                p = strchr(tail, ':');
                if (p != NULL && !isdigit((unsigned char)p[1]))
                    /*
***************
*** 281,295 ****
                    /*
                    **  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")))
                    *p = '\0';  /* It is the default: ignore it */
                }
                if (p == NULL) { 
--- 283,305 ----
                    /*
                    **  Port specified.
                    */
!                   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) { 
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]