X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/3d893db65f8109ead4868c7e692277b05fb0ec20..04f9ce457f0bc8de5408814fe43c6dbc28c1090d:/doc/bugs/preview_base_url_should_be_absolute.mdwn diff --git a/doc/bugs/preview_base_url_should_be_absolute.mdwn b/doc/bugs/preview_base_url_should_be_absolute.mdwn index fb9a05951..f160a84c4 100644 --- a/doc/bugs/preview_base_url_should_be_absolute.mdwn +++ b/doc/bugs/preview_base_url_should_be_absolute.mdwn @@ -20,3 +20,34 @@ git|http://git.oblomov.eu/ikiwiki]]. > [[todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both]] > suggests that this might already work, but I'm not quite sure how - I'd > expect it to need more environment variables? --[[smcv]] +> +>> `CGI::url` uses `REQUEST_URI`. So it could be used, but I don't see +>> how to get from the `CGI::url` to an url to the page that is being +>> edited. --[[Joey]] +>>> (The right rune seems to be: `URI->new_abs(urlto($params{page}), $cgi->url))` --[[Joey]] + +--- + +Update: This bug is worse than it first appeared, and does not only affect +previewing. The cgi always has a `` url, and it's always relative, +and that can break various links etc. For example, when the 404 plugin +displays a missing page, it has a Recentchanges link, which would be broken +if the cgi was in an unusual place. + +`misctemplate` needs to *always* set an absolute baseurl. Which is a problem, +since `misctemplate` is not currently passed a cgi object from which to +construct one. --[[Joey]] + +Update: Worse and worse. `baseurl(undef)` can be a relative url, but +nearly every use of it I can find actually needs to be absolute. +the numerous `redirect($q, baseurl(undef))` all need to be absolute +according to `CGI` documentation. + +So, I'm seriously thinking about reverting the part of +[[todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both]] +that made `baseurl(undef)` relative. +And I suppose, re-opening that todo. :( --[[Joey]] + +---- + +This was fixed in version 3.20110105 [[done]] --[[Joey]]