developer.jelix.org is not used any more and exists only for
history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.
Opened 9 years ago
Closed 5 years ago
#1447 closed enhancement (wontfix)
url_significant plugin, force https and http
Reported by: | zitoun | Owned by: | zitoun |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | jelix:plugins:urls | Version: | 1.3.1 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Documentation needed: | no | |
Hosting Provider: | Php version: |
Description (last modified by laurentj)
While jurl can generate https urls with specific parameter in urls.xml, it cannot force to http other actions. I suggest to turn around this limitation by using the parameter in a 3-state value:
- https="true" => force jurl to generate a full https url
- http="false" => force jurl to generate a full http url
- no parameter (=null) => common use, generate relative urls
List of files updated to support the patch:
- jelix/plugins/urls/significant/jSignificantUrlsCompiler.class.php
method compile():
$this->defaultUrl = new significantUrlInfoParsing ( $type, (string)$tag['name'], (isset($tag['default']) ? (((string)$tag['default']) == 'true'):false), (isset($tag['https']) ? (((string)$tag['https']) == 'true'):null) );
- jelix/plugins/urls/significant/significants.urls.php
method create():
if ($urlinfo[2]) $url->scriptName = $GLOBALS['gJCoord']->request->getServerURI(true).$url->scriptName; else if ($urlinfo[2] === false) $url->scriptName = $GLOBALS['gJCoord']->request->getServerURI(false).$url->scriptName; }}
Change History (5)
comment:1 Changed 9 years ago by zitoun
comment:2 Changed 9 years ago by zitoun
This patch cause response type sitemap to provide wrong full urls. Change on the file jResponseSitemap.class.php:
method addUrl():
if (preg_match('/^http/', $loc)) { $url->loc = $loc; } else { $url->loc=$gJCoord->request->getServerURI(). $loc; }
comment:3 Changed 9 years ago by laurentj
- Description modified (diff)
- Owner set to zitoun
- Status changed from new to assigned
comment:4 Changed 9 years ago by laurentj
a true patch with unit tests may be better ;-)
comment:5 Changed 5 years ago by laurentj
- Resolution set to wontfix
- Status changed from assigned to closed
Theses days, where HTTPS is now mandatory on every web site, and even browser will force now to use https on page having forms with passwords, it does not make sens to force an url to be http.
Note: See
TracTickets for help on using
tickets.
1/ jelix/plugins/urls/significant/jSignificantUrlsCompiler.class.php method compile():
2/ jelix/plugins/urls/significant/significants.urls.php method create():