1 [[!meta author="""http://smcv.pseudorandom.co.uk/"""]]
3 [[!meta authorurl="""http://smcv.pseudorandom.co.uk/"""]]
5 [[!meta title="""change to todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both on ikiwiki"""]]
7 [[!meta permalink="http://ikiwiki.info/recentchanges/#change-d916cd2f71f1c22dad947d7b2134edbbb15e7b8e"]]
9 <div id="change-d916cd2f71f1c22dad947d7b2134edbbb15e7b8e" class="metadata">
10 <span class="desc"><br />Changed pages:</span>
11 <span class="pagelinks">
13 <a href="http://git.ikiwiki.info/?p=ikiwiki;a=blobdiff;f=doc/todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both.mdwn;h=80925b458287767620d8862f782e77b1bd7dda63;hp=4fafc2bbc249ac9e22869129f8702e0a6d54a5ba;hb=d916cd2f71f1c22dad947d7b2134edbbb15e7b8e;hpb=178d6a16c2fff68edfbe6a1af5c8a9fa91db6039" title="diff" rel="nofollow">[[diff|wikiicons/diff.png]]</a><a href="http://ikiwiki.info/ikiwiki.cgi?page=todo%2Fwant_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both&do=goto" rel="nofollow">todo/want to avoid ikiwiki using http or https in urls to allow serving both</a>
17 <span class="desc"><br />Changed by:</span>
18 <span class="committer">
20 <a href="http://smcv.pseudorandom.co.uk/" rel="nofollow">smcv</a>
23 <span class="desc"><br />Commit type:</span>
24 <span class="committype">web</span>
25 <span class="desc"><br />Date:</span>
26 <span class="changedate"><span class="relativedate" title="Mon, 22 Nov 2010 19:45:02 +0000">19:45:02 11/22/10</span></span>
27 <span class="desc"><br /></span>
31 <a href="http://ikiwiki.info/ikiwiki.cgi?rev=d916cd2f71f1c22dad947d7b2134edbbb15e7b8e&do=revert" title="revert" rel="nofollow">[[revert|wikiicons/revert.png]]</a>
34 <div class="changelog">
37 respond to feedback<br />
44 diff --git a/doc/todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both.mdwn b/doc/todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both.mdwn
45 index 4fafc2b..80925b4 100644
46 --- a/doc/todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both.mdwn
47 +++ b/doc/todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both.mdwn
48 @@ -191,14 +191,41 @@ New API added by this branch:
49 > The new form for local urls will typically be only a little bit longer,
50 > except in the unusual case where the cgiurl is elsewhere. --[[Joey]]
52 + >> So, have urlto(x, y) use `$local_url`? There are few calls, but IMO
53 + >> they're for the most important things - wikilinks, img, map and
54 + >> other ordinary hyperlinks. Using `$local_url` would be fine for
55 + >> webserver-based use, but it does stop you browsing your wiki's
56 + >> HTML over `file:///` (unless you set that as the base URL, but
57 + >> then you can't move it around), and stops you moving simple
58 + >> outputs (like the docwiki!) around.
60 + >> I personally think breaking the docwiki is enough to block that.
62 + >> How about this?
64 + >> * `urlto($link, $page)` with `$page` defined: relative
65 + >> * `urlto($link, undef)`: local, starts with `/`
66 + >> * `urlto($link)`: also local, as a side-effect
67 + >> * `urlto($link, $anything, 1)` (but idiomatically, `$anything` is
68 + >> normally undef): absolute, starts with `http[s]://`
70 + >> --[[smcv]]
72 * `IkiWiki::baseurl` has a new second argument which works like the
73 third argument of `urlto`
75 + > I assume you have no objection to this --[[smcv]]
77 * `IkiWiki::cgiurl` uses `$local_cgiurl` if passed `local_cgiurl => 1`
79 + > Possibly changed to making this always be local unless `cgiurl => $x`
80 + > is given: see below --[[smcv]]
82 * `IkiWiki::cgiurl` omits the trailing `?` if given no named parameters
83 except `cgiurl` and/or `local_cgiurl`
85 + > I assume you have no objection to this --[[smcv]]
89 * I don't think anything except `openid` calls `cgiurl` without also
90 @@ -211,10 +238,18 @@ Bugs:
92 > I agree that makes sense. --[[Joey]]
94 + >> I'm not completely sure whether you're agreeing with "perhaps do this"
95 + >> or "that looks too strange", so please disambiguate:
96 + >> would you accept a patch that makes `cgiurl` default to a local
97 + >> (starts-with-`/`) result? If you would, that'd reduce the diff. --[[smcv]]
99 * It occurs to me that `IkiWiki::cgiurl` could probably benefit from being
100 exported? Perhaps also `IkiWiki::baseurl`?
102 - > Possibly, see [[firm_up_plugin_interface]]. --[[Joey]]
103 + > Possibly, see [[firm_up_plugin_interface]]. --[[Joey]]
105 + >> Not really part of this branch, though, so wontfix (unless you ask me
106 + >> to do so). --[[smcv]]
108 * Or, to reduce use of the unexported `baseurl` function, it might make
109 sense to give `urlto` a special case that references the root of the wiki,
110 @@ -227,3 +262,5 @@ Bugs:
112 > AFACIS, `baseurl` is only called in 3 places so I don't think that's
113 > needed. --[[Joey]]
115 + >> OK, wontfix. --[[smcv]]
120 <!-- d916cd2f71f1c22dad947d7b2134edbbb15e7b8e -->