Re: XML RPC - automatically switch to ssl/https if port 443 is specified
| From: | Justin Patrin | Date: | Fri, 21 Jan 2005 01:12:23 +0000 |
| Subject: | Re: XML RPC - automatically switch to ssl/https if port 443 is specified | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35656@lists.php.net to get a copy of this message | ||
On Thu, 20 Jan 2005 20:10:41 -0500, Matt Friedman
<matt.friedman@gmail.com> wrote:
> Yes, having thought about it a bit more, I think that is best. If you
> don't specify a protocol, and you specify port 443, then default to
> https.
>
> In other cases I think the default protocol would be http.
I concur.
>
>
> On Thu, 20 Jan 2005 16:54:08 -0800, Justin Patrin <papercrane@gmail.com> wrote:
> > On Thu, 20 Jan 2005 18:59:09 -0500, Matt Friedman
> > <matt.friedman@gmail.com> wrote:
> > > One more thing which I thought about when reading the thread again:
> > >
> > > - The default protocol should be HTTP, which I would say is sensible.
> > > If you don't specify the protocol, you get HTTP.
> > >
> > > - Everything else from my last email holds.
> >
> > I agree completely with your last e-mail. I don't think any of that
> > was going to be violated. ;-)
> >
> > This last, however, is what this thread is about. Should it
> > automatically use HTTPS when you don't specify a protocol and set the
> > port to 443?
> >
> > >
> > > On Thu, 20 Jan 2005 18:50:56 -0500, Matt Friedman
> > > <matt.friedman@gmail.com> wrote:
> > > > Here's how I think it should work:
> > > >
> > > > 1. If you specify a port it should use that port no matter what. The
> > > > class shouldn't "assume" you meant something else and change the
> > > > port
> > > > on you. A certain Redmond company's apps are infamous for this sort of
> > > > thing (major pet-peeve)
> > > >
> > > > 2. If you don't specify a port, but you do specify a protocol it
> > > > should default to a sensible port for that protocol - for instance, if
> > > > you specify 'http' it should default to port 80 - likewise if you
> > > > specify 'https' it should default to port 443
> > > >
> > > > 3. If you specify a protocol and a port, it uses what you specified.
> > > > The class, once again, doesn't make changes to what you have
> > > > specified.
> > > >
> > > > Then if you were running https on 8080 or something like that you'd
> > > > specify the protocol and the port - and that's what the class would
> > > > use.
> > > >
> > > > To me, this is the most intuitive and user-friendly.
> > > >
> > > >
> > > > On Thu, 20 Jan 2005 13:25:37 -0500, DreamWerx <dreamwerx@gmail.com> wrote:
> > > > > No I wasn't initially specifying a protocol, which is where the
> > > > > problem came from, but it seems kind of inconsistent for the package
> > > > > to change the port to 443 if it sees https/ssl (it's assuming you want
> > > > > to run SSL over 443) and not go the other way. Everyone know of those
> > > > > commonly used ports and what protocols typically run over them.
> > > > >
> > > > >
> > > > > On Thu, 20 Jan 2005 09:24:38 -0800, Justin Patrin
> > > > > <papercrane@gmail.com> wrote:
> > > > > > On Thu, 20 Jan 2005 12:00:32 -0500, DreamWerx
> > > > > > <dreamwerx@gmail.com> wrote:
> > > > > > > Internally in the sendPayload function, if XML-RPC sees a
> > > > > > > https/ssl
> > > > > > > prefix on the servername it will switch the port to 443, how
> > > > > > > about
> > > > > > > adding; if the function sees port 443 and there is no https/ssl
> > > > > > > prefix
> > > > > > > on the servername it will add it?
> > > > > > >
> > > > > > > I ran into a problem where I had port 443 configured and a
> > > > > > > hostname
> > > > > > > with no ssl:// prefix. I kept getting errors, with
> > > > > > > apache/mod_ssl
> > > > > > > debugging on, mod_ssl/openssl reported that I was attempting to
> > > > > > > talk
> > > > > > > HTTP on a HTTPS port.. Which helped resolve the
> > > > > > > misconfiguration.
> > > > > >
> > > > > > Are you giving it a protocol at all? IMHO if you say
> > > > > > http:// and port
> > > > > > 443 it should still try to talk HTTP. However, if you give no protocol
> > > > > > and posrt 443, it would make (some) sense to me to auto-switch to SSL,
> > > > > > but it makes even more sense to just use the https or ssl protocol
> > > > > > entry and forget the port.
> > > > > >
> > > > > > >
> > > > > > > Thoughts?
> > > > > > >
> > > > > > > BTW thanks for the quick RC3 fix yesterday...
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > Justin Patrin
> > > > > >
> > > > >
> > > > > --
> > > > > PEAR Development Mailing List (http://pear.php.net/)
> > > > > To unsubscribe, visit:
> > > > > http://www.php.net/unsub.php
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Matt Friedman
> > > >
> > > > "A good engineer is a person who makes a design that works with as few
> > > > original ideas as possible. There are no prima donnas in engineering."
> > > > -- Freeman Dyson
> > > >
> > >
> >
> > --
> > Justin Patrin
> >
>
>
--
Justin Patrin