httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hyperreal.org
Subject cvs commit: apache-1.3/src/modules/standard mod_usertrack.c
Date Mon, 08 Jun 1998 06:09:53 GMT
dgaudet     98/06/07 23:09:53

  Modified:    src      CHANGES
               src/modules/standard mod_usertrack.c
  Log:
  don't hammer the hostname... it's a constant string... note I changed the
  cookie format to include the FQDN, I don't see why it doesn't include
  the FQDN.
  
  PR:		2366
  
  Revision  Changes    Path
  1.896     +4 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.895
  retrieving revision 1.896
  diff -u -r1.895 -r1.896
  --- CHANGES	1998/06/08 05:39:53	1.895
  +++ CHANGES	1998/06/08 06:09:51	1.896
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3.1
   
  +  *) mod_usertrack was corrupting the client hostname.  As part of the
  +     fix, the cookie values were slightly extended to include the
  +     fully qualified hostname of the client.  [Dean Gaudet] PR#2366
  +
     *) Fix a typo in pool debugging code.  [Alvaro Martinez Echevarria]
   
     *) mod_unique_id did not work on alpha linux (in general on any
  
  
  
  1.35      +3 -7      apache-1.3/src/modules/standard/mod_usertrack.c
  
  Index: mod_usertrack.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_usertrack.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- mod_usertrack.c	1998/04/11 12:00:53	1.34
  +++ mod_usertrack.c	1998/06/08 06:09:52	1.35
  @@ -137,13 +137,9 @@
       /* 1024 == hardcoded constant */
       char cookiebuf[1024];
       char *new_cookie;
  -    char *dot;
       const char *rname = ap_get_remote_host(r->connection, r->per_dir_config,
   					REMOTE_NAME);
   
  -    if ((dot = strchr(rname, '.')))
  -        *dot = '\0';            /* First bit of hostname */
  -
   #if defined(NO_GETTIMEOFDAY) && !defined(NO_TIMES)
   /* We lack gettimeofday(), so we must use time() to obtain the epoch
      seconds, and then times() to obtain CPU clock ticks (milliseconds).
  @@ -151,7 +147,7 @@
   
       mpe_times = times(&mpe_tms);
   
  -    ap_snprintf(cookiebuf, sizeof(cookiebuf), "%s%d%ld%ld", rname, (int) getpid(),
  +    ap_snprintf(cookiebuf, sizeof(cookiebuf), "%s.%d%ld%ld", rname, (int) getpid(),
                   (long) r->request_time, (long) mpe_tms.tms_utime);
   #elif defined(WIN32)
       /*
  @@ -160,13 +156,13 @@
        * was started. It should be relatively unique.
        */
   
  -    ap_snprintf(cookiebuf, sizeof(cookiebuf), "%s%d%ld%ld", rname, (int) getpid(),
  +    ap_snprintf(cookiebuf, sizeof(cookiebuf), "%s.%d%ld%ld", rname, (int) getpid(),
                   (long) r->request_time, (long) GetTickCount());
   
   #else
       gettimeofday(&tv, &tz);
   
  -    ap_snprintf(cookiebuf, sizeof(cookiebuf), "%s%d%ld%d", rname, (int) getpid(),
  +    ap_snprintf(cookiebuf, sizeof(cookiebuf), "%s.%d%ld%d", rname, (int) getpid(),
                   (long) tv.tv_sec, (int) tv.tv_usec / 1000);
   #endif
   
  
  
  

Mime
View raw message