You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ICS.UCI.EDU> on 1997/03/29 03:17:21 UTC
Re: [PATCH] Re: general/276: SERVER_PORT variable is negative
+1
....Roy
In message <97...@decus.org>, Rodent of Unusual Size writes:
>From the fingers of Thomas Hall flowed the following:
>>
>>When running a test cgi, I noticed that the SERVER_PORT variable was negative
>.
> 8< snip
>>I think that you are using a signed short when you should have an unsigned sh
>ort.
>
> Ouch! Right he is. The following patch fixes this for my CGI tests
> and compiles cleanly on OSF/1. However, it's a fairly basic change;
> anyone see any drawbacks?
>
> I noticed that these two cells have counterparts in mod_rewrite,
> too, so Ralf might want to track the change there if voted in.
>
> #ken :-)}
>
>Index: httpd.h
>===================================================================
>RCS file: /usr/users/coar/myApache/repository/apache/src/httpd.h,v
>retrieving revision 1.92
>diff -c -r1.92 httpd.h
>*** 1.92 1997/03/20 17:10:09
>--- httpd.h 1997/03/27 21:21:35
>***************
>*** 568,574 ****
> struct server_addr_rec {
> server_addr_rec *next;
> struct in_addr host_addr; /* The bound address, for this server *
>/
>! short host_port; /* The bound port, for this server */
>
> char *virthost; /* The name given in <VirtualHost> */
> };
>
>--- 568,574 ----
> struct server_addr_rec {
> server_addr_rec *next;
> struct in_addr host_addr; /* The bound address, for this server *
>/
>! unsigned short host_port; /* The bound port, for this server */
>
> char *virthost; /* The name given in <VirtualHost> */
> };
>
>***************
>*** 586,592 ****
>
> char *server_admin;
> char *server_hostname;
>! short port; /* for redirects, etc. */
>
> /* Log files --- note that transfer log is now in the modules... */
>
>--- 586,592 ----
>
> char *server_admin;
> char *server_hostname;
>! unsigned short port; /* for redirects, etc. */
>
> /* Log files --- note that transfer log is now in the modules... */
>