httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@hyperreal.com>
Subject cvs commit: apache/src http_protocol.c
Date Thu, 13 Jun 1996 16:33:53 GMT
akosut      96/06/13 09:33:52

  Modified:    src       http_protocol.c
  Log:
  Fix problem with multi-port (Listen/VirtualHost ...:port) servers
  conflicting with the Host: header checking code.
  
  Revision  Changes    Path
  1.23      +5 -3      apache/src/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_protocol.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -C3 -r1.22 -r1.23
  *** http_protocol.c	1996/06/10 02:04:04	1.22
  --- http_protocol.c	1996/06/13 16:33:50	1.23
  ***************
  *** 352,360 ****
    
    void check_hostalias (request_rec *r) {
      char *host = getword(r->pool, &r->hostname, ':');	/* Get rid of port */
      server_rec *s;
    
  !   if (*r->hostname && (atoi(r->hostname) != r->server->port))
        return;
    
      if ((host[strlen(host)-1]) == '.') {
  --- 352,361 ----
    
    void check_hostalias (request_rec *r) {
      char *host = getword(r->pool, &r->hostname, ':');	/* Get rid of port */
  +   int port = (*r->hostname) ? atoi(r->hostname) : 0;
      server_rec *s;
    
  !   if (port && (port != r->server->port))
        return;
    
      if ((host[strlen(host)-1]) == '.') {
  ***************
  *** 365,372 ****
    
      for (s = r->server->next; s; s = s->next) {
        char *names = s->names;
  ! 
  !     if (!strcasecmp(host, s->server_hostname)) {
          r->server = r->connection->server = s;
          if (r->hostlen && !strncmp(r->uri, "http://", 7)) {
    	r->uri += r->hostlen;
  --- 366,374 ----
    
      for (s = r->server->next; s; s = s->next) {
        char *names = s->names;
  !     
  !     if ((!strcasecmp(host, s->server_hostname)) &&
  ! 	(!port || (port == s->port))) {
          r->server = r->connection->server = s;
          if (r->hostlen && !strncmp(r->uri, "http://", 7)) {
    	r->uri += r->hostlen;
  
  
  

Mime
View raw message