* fixed bug that prevented the use of URLs without protocol prefix in lynx for windows (i.e. lynx.isc.org was being rejected, but http://lynx.isc.org was OK). PS: this is the patch to dev16 - so the bug may have been fixed already - it was caused by not copying 'str' to 'host' before invoking valid_hostname on 'host'. Of course this applies only to Win32 port (if WINDOWS_NSL is defined - seems it's not for Cygwin and Mingw ports). Best regards, -Vlad --- HTTCP.c-orig Mon Mar 27 14:28:02 2000 +++ HTTCP.c Mon Mar 27 20:28:29 2000 @@ -693,6 +693,10 @@ return NULL; } +#ifdef _WINDOWS_NSL + strncpy(host, str, (size_t)512); +#endif + if (!valid_hostname(host)) { lynx_nsl_status = HT_NOT_ACCEPTABLE; #ifdef NO_RECOVERY @@ -705,11 +709,9 @@ return NULL; } -#ifdef _WINDOWS_NSL - strncpy(host, str, (size_t)512); -#else +#ifndef _WINDOWS_NSL host = str; -#endif /* _WINDOWS_NSL */ +#endif /* !_WINDOWS_NSL */ #ifdef MVS /* Outstanding problem with crash in MVS gethostbyname */ CTRACE((tfp, "LYGetHostByName: Calling gethostbyname(%s)\n", host));
