[PATCH] Make {urlbase} work in templates when https is used
Thomas Arendsen Hein
thomas at intevation.de
Wed Jul 11 06:10:47 CDT 2007
* Wesley J. Landaker <wjl at icecavern.net> [20070710 22:06]:
> On Tuesday, 10 July 2007, Thomas Arendsen Hein wrote:
> > * Wesley J. Landaker <wjl at icecavern.net> [20070710 19:10]:
> > > # HG changeset patch
> > > # User Wesley J. Landaker <wjl at icecavern.net>
> > > # Date 1184086494 21600
> > > # Node ID 1f4b44a29f507f8ddec84f56744168e3c584eb32
> > > # Parent f48290864625d7de522ad990230e1d7cc437c20a
> > > Make {urlbase} work in templates when https is used.
> > >
> > > + if req.env.get('HTTPS'):
> >
> > Which servers set this https variable?
>
> Well, at least Apache & Lighttpd, for two.
>
> I used this because it's also used in do_unbundle in the same file, for
> verifying that SSL is used if required by a config option. See around line
> 1074.
Ah, good point :)
Pushed your patch with some whitespace removed to crew.
> > And hg serve in ssl mode or behind a proxy will probably not use
> > this, too.
>
> Yes, that is a problem, and it will also currently break in do_unbundle as
> mentioned above. So that is an existing problem that I didn't fix with this
> patch, but I didn't make it worse either. =)
>
> I thought about making a patch for that by adding a/(some) config variable(s)
> that let you specifically set the urlbase, but I hadn't really looked into
> that yet.
Current crew's hg serve can speak ssl, too, but doesn't set HTTPS.
I guess we could split out SSL detection into a separate function
and fix it after that.
Thomas
--
thomas at intevation.de - http://intevation.de/~thomas/ - OpenPGP key: 0x5816791A
Intevation GmbH, Osnabrueck - Register: Amtsgericht Osnabrueck, HR B 18998
Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
More information about the Mercurial-devel
mailing list