httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@locus.apache.org
Subject cvs commit: apache-2.0/src/main util_script.c
Date Fri, 03 Nov 2000 02:15:53 GMT
dreid       00/11/02 18:15:52

  Modified:    src/main util_script.c
  Log:
  We have functions that allow us to get the ports from the sockets, so use them
  here.
  
  Revision  Changes    Path
  1.46      +3 -2      apache-2.0/src/main/util_script.c
  
  Index: util_script.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/util_script.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- util_script.c	2000/10/21 15:02:45	1.45
  +++ util_script.c	2000/11/03 02:15:50	1.46
  @@ -166,6 +166,7 @@
       apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
       apr_table_entry_t *hdrs = (apr_table_entry_t *) hdrs_arr->elts;
       int i;
  +    apr_uint32_t rport;
   
       /* use a temporary apr_table_t which we'll overlap onto
        * r->subprocess_env later
  @@ -256,8 +257,8 @@
       apr_table_addn(e, "SERVER_ADMIN", s->server_admin);	/* Apache */
       apr_table_addn(e, "SCRIPT_FILENAME", r->filename);	/* Apache */
   
  -    apr_table_addn(e, "REMOTE_PORT",
  -		  apr_psprintf(r->pool, "%d", ntohs(c->remote_addr.sin_port)));
  +    apr_get_remote_port(&rport, c->client_socket);
  +    apr_table_addn(e, "REMOTE_PORT", apr_psprintf(r->pool, "%d", rport));
   
       if (r->user) {
   	apr_table_addn(e, "REMOTE_USER", r->user);
  
  
  

Mime
View raw message