On 4/30/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> On Mon, Apr 30, 2007 at 09:02:06AM +0200, Dominique Faure wrote:
> > On 4/30/07, H. Fox <[EMAIL PROTECTED]> wrote:
> > >
> > >I switched the contitional to this:
> > >
> > >  if (!$_SERVER["HTTPS"] == 'on' || @$_SERVER['SERVER_PORT'] != '443') {
> >
> > You hurt my boolean algebra here: not(a or b) = not(a) AND not(b)
> > so I would merely write:
> >
> > if (!$_SERVER["HTTPS"] == 'on' && @$_SERVER['SERVER_PORT'] != '443') {
>
> Or even:
>
>     if (@$_SERVER['HTTPS'] != 'on' && @$_SERVER['SERVER_PORT'] != '443') {

You are correct, I was trying to get the opposite of

  if (@$_SERVER["HTTPS"] == 'on' || @$_SERVER['SERVER_PORT'] == '443') {

Either of the above would properly detect SSL for the unusual cases where
- HTTPS is not "on" but the port is 443 and
- HTTPS is "on" and the port is not 443.

Hagan

_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to