lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev Re: Maxim: HTTP/1.0 403 Forbidden [BSDI-Support-Request #51528]


From: Jeffrey C Honig
Subject: lynx-dev Re: Maxim: HTTP/1.0 403 Forbidden [BSDI-Support-Request #51528]
Date: Wed, 24 Jun 1998 21:34:43 -0400

We've discovered a bug in Lynx 2.8 (I haven't looked at later
versions).  The sin_zero[] fields are not cleared before doing a
connect().  This can result in strange errors under BSD/OS and
probably most other BSD 4.4 derivatives.  In this case it manifested
itself as by the local address being incorrect (not 127.0.0.1) when
connecting to 127.0.0.1.  When connecting to an httpd that restricts
connections to 127.0.0.1, this resultes in the 403 error mentioned
above.

I've included a proposed fix.

Thanks.

Jeff


Index: WWW/Library/Implementation/HTTCP.c
===================================================================
RCS file: /master/contrib/lynx2-8/WWW/Library/Implementation/HTTCP.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 HTTCP.c
*** HTTCP.c     1998/05/13 18:39:19     1.1.1.1
--- HTTCP.c     1998/06/25 01:31:10
***************
*** 714,719 ****
--- 714,720 ----
      /*
      **        Set up defaults.
      */
+     memset(soc_in, 0, sizeof(*soc_in));
      soc_in->sin_family = AF_INET;
      soc_in->sin_port = htons(default_port);
  

reply via email to

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