[Xitami-Dev] SERVER_PORT

bernd hohmann xitami-dev@lists.xitami.org
Wed, 29 May 2002 13:38:06 +0100 (MEZ)


On Wed, 29 May 2002 06:48:53 EDT, TonicPeddler@aol.com wrote:

> Also, could you show your code for accessing that environment variable, you 
> might be doing it wrong.

you should trust an old programmer ;-)

the problem is in xitami 2.5b4 and b5 (not in d9/d10 !)

smthttpl.c around line 2581 has to be patched like this:

    /*  Format port number as a string                          
            */
    if (p_http-> ssl_connection)
//      sprintf (port_name, "%d", p_http-> port); 29.05.02 ho:
        sprintf (port_name, "%d", p_http-> ssl_port);
    else
//      sprintf (port_name, "%d", p_http-> ssl_port); 29.05.02
ho:
        sprintf (port_name, "%d", p_http-> port);

bernd