You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Roy Fielding <fi...@hyperreal.com> on 1996/11/12 07:02:58 UTC

cvs commit: apache/src util_script.c

fielding    96/11/11 22:02:56

  Modified:    src       util_script.c
  Log:
  Added REMOTE_PORT to the environment variables set for scripts,
  with the value being the client's TCP port.  This allows CGI scripts
  to independently check the client's Ident (RFC 1413) without needing
  IdentityCheck "On" for the whole server.
  
  Revision  Changes    Path
  1.26      +3 -0      apache/src/util_script.c
  
  Index: util_script.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/util_script.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -C3 -r1.25 -r1.26
  *** util_script.c	1996/11/03 20:52:12	1.25
  --- util_script.c	1996/11/12 06:02:54	1.26
  ***************
  *** 177,182 ****
  --- 177,185 ----
        table_set (e, "SERVER_ADMIN", s->server_admin); /* Apache */
        table_set (e, "SCRIPT_FILENAME", r->filename); /* Apache */
        
  +     sprintf(port, "%d", c->remote_addr.sin_port);
  +     table_set (e, "REMOTE_PORT", port);            /* Apache */
  + 
        if (c->user) table_set(e, "REMOTE_USER", c->user);
        if (c->auth_type) table_set(e, "AUTH_TYPE", c->auth_type);
        rem_logname = get_remote_logname(r);