Re: [PATCH] Location header recovering to absoluteURI

Stipe Tolj <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization tolj.org system architecture
Message-ID <[email protected]>
Nikos Balkanas schrieb:
> Hold on,
> 
> I agree completely with you in terms of performance, but the if
> statement is not correct the way it stands. Shouldn't it be?
> 
>    
> if (!((!trans->ssl && trans-port == 80) || (trans-ssl && trans-port ==
> 443)))
>   octstr_format_append(os, ":%ld", trans->port);

I have committed it this way:

        /* port, only added if literally not default. */
        if (trans->port != 80 || trans->ssl) {
            octstr_format_append(os, ":%ld", trans->port);
        }

which simply ensures we don't omit the port 80 in case of SSL'ed conn. If we
have a normal https:// scheme with port 443, we'll include the port. But as this
is a "much less likely" case, I think we shouldn't do the checks in the if
statement for all.

Stipe


-- 
-------------------------------------------------------------------
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture      Kannel Software Foundation (KSF)
http://www.tolj.org/              http://www.kannel.org/

mailto:st_{at}_tolj.org           mailto:stolj_{at}_kannel.org
-------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.