- From: Thorsten Ludewig <Thorsten.Ludewig@rz.fh-wolfenbuettel.de>
- Date: Mon, 20 Mar 1995 15:31:12 +0100
- To: www-talk@w3.org
Hello I have written a patch for the Mosaic-2.6a1 to get NoProxy-support via Xressource. f.e. Mosaic*noProxy: fh-wolfenbuettel.de:cle.de This patch is also available from ftp://ftp.fh-wolfenbuettel.de/WWW-FHWF/misc/ A patched version for Solaris 2.4 (dynamic!) you can get from ftp://ftp.fh-wolfenbuettel.de/WWW-FHWF/SunOS5/ Have fun with this stuff :) Bye bye Thorsten ______________________________________________________________________ __________ /___ ___/| |__/ /|__|/ Thorsten Ludewig / / / /| /__/ / / / E-Mail: th@rz.fh-wolfenbuettel.de |__|/ /_/____ WWW-Homepage: http://www.fh-wolfenbuettel.de/~th/ /_________/| IRC-Nickname: Daimos |_________|/ ------ SCHNIPP / Mosaic-2.6a1.NoProxy.patch / SCHNAPP ------- diff -c ../Mosaic-2.6a1.orig/libwww2/HTAccess.c libwww2/HTAccess.c *** ../Mosaic-2.6a1.orig/libwww2/HTAccess.c Sun Mar 12 20:21:06 1995 --- libwww2/HTAccess.c Mon Mar 20 09:42:38 1995 *************** *** 44,50 **** /* #define TRACE 1 */ ! extern char *mo_check_for_proxy (char *); --- 44,50 ---- /* #define TRACE 1 */ ! extern char *mo_check_for_proxy (char *, char *); *************** *** 161,167 **** */ if ((proxy == NULL)||(proxy[0] == '\0')) { ! proxy = mo_check_for_proxy(access); } #ifndef DIRECT_WAIS --- 161,168 ---- */ if ((proxy == NULL)||(proxy[0] == '\0')) { ! proxy = mo_check_for_proxy(access, ! HTParse(addr, "", PARSE_HOST)); } #ifndef DIRECT_WAIS diff -c ../Mosaic-2.6a1.orig/src/gui.c src/gui.c *** ../Mosaic-2.6a1.orig/src/gui.c Sun Mar 12 20:21:33 1995 --- src/gui.c Mon Mar 20 10:31:10 1995 *************** *** 312,319 **** * The proxy gateway to use. (http://proxy.ncsa.uiuc.edu:911/) * remarks: This should really be open-ended configurable. ****************************************************************************/ ! char *mo_check_for_proxy (char *access) { if (access == NULL) { return((char *)NULL); --- 312,361 ---- * The proxy gateway to use. (http://proxy.ncsa.uiuc.edu:911/) * remarks: This should really be open-ended configurable. ****************************************************************************/ ! char *mo_check_for_proxy (char *access, char *host) { + + /* + * XRessource NoProxy support added by + * 03/20/95 Thorsten Ludewig - th@rz.fh-wolfenbuettel.de + * http://www.fh-wolfenbuettel.de/~th/ + * + * f.e. + * Mosaic*noProxy: fh.wolfenbuettel.de:cle.de + * + */ + + if ( host != NULL && Rdata.no_proxy != NULL ) { + int i; + char *s, *e; + char h[1024], + np[1024]; /* Ok - Not really nice. */ + + strcpy( h, host ); + strcpy( np, Rdata.no_proxy ); + + /* lower-case only */ + for( i=0; h[i] != 0; i++ ) + h[i] = tolower( h[i] ); + for( i=0; np[i] != 0; i++ ) + np[i] = tolower( np[i] ); + + s = np; + while ( s ) { + e = strchr( s, ':' ); + if ( e ) { + *e = 0; + e++; + } + if( strstr( h, s )) { + return((char *)NULL); + } + s = e; + } + } + + /**************** End of NoProxy *****************/ + if (access == NULL) { return((char *)NULL); diff -c ../Mosaic-2.6a1.orig/src/mosaic.h src/mosaic.h *** ../Mosaic-2.6a1.orig/src/mosaic.h Sun Mar 12 20:21:40 1995 --- src/mosaic.h Mon Mar 20 09:11:23 1995 *************** *** 461,466 **** --- 461,467 ---- char *gopher_proxy; char *news_proxy; char *file_proxy; + char *no_proxy; int colors_per_inlined_image; diff -c ../Mosaic-2.6a1.orig/src/xresources.h src/xresources.h *** ../Mosaic-2.6a1.orig/src/xresources.h Sun Mar 12 20:21:43 1995 --- src/xresources.h Mon Mar 20 09:12:36 1995 *************** *** 202,207 **** --- 202,209 ---- offset (news_proxy), XtRString, NULL }, { "fileProxy", "ProxyGateway", XtRString, sizeof (char *), offset (file_proxy), XtRString, NULL }, + { "noProxy", "NoProxy", XtRString, sizeof (char *), + offset (no_proxy), XtRString, NULL }, { "fullHostname", "FullHostname", XtRString, sizeof (char *), offset (full_hostname), XtRString, NULL },
Received on Monday, 20 March 1995 14:13:01 UTC