From bb2571129d751c4276ce1a3c086f857b25b0c23c Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Mon, 8 Feb 2016 08:39:47 +0400 Subject: [PATCH 1/4] =?UTF-8?q?cgi:=20cgierror=20et=20cgiredirect=20arr?= =?UTF-8?q?=C3=AAtent=20le=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ulib/cgi | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/ulib/cgi b/lib/ulib/cgi index 4c59d8f..248f51e 100644 --- a/lib/ulib/cgi +++ b/lib/ulib/cgi @@ -32,13 +32,6 @@ function nocache_header() { echo "Expires: Thu, 01 Jan 1970 00:00:00 GMT" } -function cgiredirect() { - # Rediriger le client vers une autre page - echo "Status: 302 Found" - echo "Location: $1" - echo "" -} - function cgicontent() { # Générer les en-têtes nécessaire avant de servir le contenu. # $1(=text/html) est le type de contenu. S'il faut servir le contenu avec @@ -80,7 +73,18 @@ function cgicontent_nocache() { } function cgierror() { - # Afficher un message d'erreur + # Afficher les en-têtes pour désactiver la mise en cache, puis afficher un + # message d'erreur puis arrêter le script cgicontent_nocache text/plain echo "ERROR: $*" + exit 1 +} + +function cgiredirect() { + # Afficher les en-têtes pour rediriger le client vers la page $1 puis + # arrêter le script + echo "Status: 302 Found" + echo "Location: $1" + echo "" + exit 0 } From da3ef60cc054aeb3f714333764181357d573b69f Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Mon, 8 Feb 2016 09:34:02 +0400 Subject: [PATCH 2/4] =?UTF-8?q?cgilsxml.py:=20ajouter=20de=20squery=5Fstri?= =?UTF-8?q?ng=20permettant=20d'ajouter=20un=20pr=C3=A9fixe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ulib/support/cgilsxml.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/ulib/support/cgilsxml.py b/lib/ulib/support/cgilsxml.py index 294681f..cbe343e 100755 --- a/lib/ulib/support/cgilsxml.py +++ b/lib/ulib/support/cgilsxml.py @@ -218,15 +218,17 @@ def print_files(files, fgroups=None, select_group=None, script_name=None, xslt=N fparams = urlparse.parse_qsl(fquery_string, keep_blank_values=True) if includes or excludes or prefix: xorig = ET.SubElement(xenv, "orig") - if query_string: query_string = u'?%s' % query_string - ET.SubElement(xorig, "query_string").text = query_string + if query_string: + ET.SubElement(xorig, "query_string").text = u'?%s' % query_string + ET.SubElement(xorig, "squery_string").text = u'&%s' % query_string xvars = ET.SubElement(xorig, "query_vars") for name, value in params: ET.SubElement(xvars, name).text = value query_string = fquery_string params = fparams - if query_string: query_string = u'?%s' % query_string - ET.SubElement(xenv, "query_string").text = query_string + if query_string: + ET.SubElement(xenv, "query_string").text = u'?%s' % query_string + ET.SubElement(xenv, "squery_string").text = u'&%s' % query_string xvars = ET.SubElement(xenv, "query_vars") for name, value in params: ET.SubElement(xvars, name).text = value From 6335c1bbc68f9008045608b1487b19500bcbd040 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Mon, 8 Feb 2016 09:41:42 +0400 Subject: [PATCH 3/4] Init changelog & version 3.3.0 --- CHANGES.txt | 5 +++++ VERSION.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 95f9435..5d2f32a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,8 @@ +## Version 3.3.0 du 08/02/2016-09:41 + +da3ef60 cgilsxml.py: ajouter de squery_string permettant d'ajouter un préfixe +bb25711 cgi: cgierror et cgiredirect arrêtent le script + ## Version 3.2.0 du 07/02/2016-23:05 24f3211 cgiparams.py et cgilsxml.py: modifications pour gérer la construction de QUERY_STRING diff --git a/VERSION.txt b/VERSION.txt index 944880f..15a2799 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -3.2.0 +3.3.0 From fc134e3a885bf0160867307551e58d435afcbc36 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Mon, 8 Feb 2016 09:41:53 +0400 Subject: [PATCH 4/4] maj ulib --- lib/ulib/.ulibver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ulib/.ulibver b/lib/ulib/.ulibver index e0af680..482734c 100644 --- a/lib/ulib/.ulibver +++ b/lib/ulib/.ulibver @@ -1 +1 @@ -011000000 +011001000