Index: trunk/zoo-project/HISTORY.txt
===================================================================
--- trunk/zoo-project/HISTORY.txt	(revision 982)
+++ trunk/zoo-project/HISTORY.txt	(revision 984)
@@ -1,3 +1,4 @@
 Version 1.8.1
+  * Make all demos running within docker
   * Deploy demo HTML UI from github from the Dockerfile
   * Add demo ZOO-Services build in the Dockerfile
Index: trunk/zoo-project/zoo-kernel/configure.ac
===================================================================
--- trunk/zoo-project/zoo-kernel/configure.ac	(revision 982)
+++ trunk/zoo-project/zoo-kernel/configure.ac	(revision 984)
@@ -415,6 +415,4 @@
 CPPFLAGS_SAVE="$CPPFLAGS"
 CPPFLAGS="$PROJ_CPPFLAGS"
-AC_CHECK_HEADERS([proj_api.h],
-                 [], [AC_MSG_ERROR([could not find headers include related to PROJ4])])
 
 AC_SUBST([PROJ_CPPFLAGS])
@@ -607,5 +605,6 @@
 	echo $PYTHONCONFIG
 	# Extract the linker and include flags 
-	PYTHON_LDFLAGS=`$PYTHONCONFIG --ldflags`
+	#PYTHON_LDFLAGS=`$PYTHONCONFIG --ldflags`
+	PYTHON_LDFLAGS=$($PYTHONCONFIG --ldflags | sed "s:python${PYTHON_VERS}/config-${PYTHON_VERS}-::g")
 	PYTHON_CPPFLAGS=`$PYTHONCONFIG --includes`
 
@@ -618,8 +617,12 @@
 	# Ensure we can link against libphp
 	LIBS_SAVE="$LIBS"
-	LIBS="$PYTHON_LDFLAGS"
-	PY_LIB=`$PYTHONCONFIG --libs | sed \
-			      -e 's/.*\(python[[0-9]]\.[[0-9]]\).*/\1/'`
-	AC_CHECK_LIB([$PY_LIB], [PyObject_CallObject], [], [AC_MSG_ERROR([could not find libpython])], [])
+	#LIBS="$PYTHON_LDFLAGS"
+	#PY_LIB=`$PYTHONCONFIG --libs | sed \
+	#		      -e 's/.*\(python[[0-9]]\.[[0-9]]\).*/\1/'`
+	#AC_CHECK_LIB([$PY_LIB], [PyObject_CallObject], [], [AC_MSG_ERROR([could not find libpython])], [])
+	LIBS="m $PYTHON_LDFLAGS -lpython${PYTHON_VERS}"
+	PYTHON_LDFLAGS="-l$LIBS"
+	LDFLAGS=$PYTHON_LDFLAGS
+	AC_CHECK_LIB([], [PyObject_CallObject], [], [AC_MSG_ERROR([could not find libpython])], [])
 	LIBS="$LIBS_SAVE"
 fi
Index: trunk/zoo-project/zoo-kernel/main_conf_read.y
===================================================================
--- trunk/zoo-project/zoo-kernel/main_conf_read.y	(revision 982)
+++ trunk/zoo-project/zoo-kernel/main_conf_read.y	(revision 984)
@@ -154,4 +154,7 @@
   my_maps=my_map;
   my_maps->name=NULL;
+  my_maps->content=NULL;
+  my_maps->child=NULL;
+  my_maps->next=NULL;
   current_maps=my_maps;
   
Index: trunk/zoo-project/zoo-kernel/service.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service.c	(revision 982)
+++ trunk/zoo-project/zoo-kernel/service.c	(revision 984)
@@ -838,4 +838,5 @@
 	else
 	  pmsCursor->next->child=NULL;
+	return;
       }
       else{
Index: trunk/zoo-project/zoo-kernel/service_internal_ms.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_ms.c	(revision 982)
+++ trunk/zoo-project/zoo-kernel/service_internal_ms.c	(revision 984)
@@ -1272,5 +1272,7 @@
   m->numlayers++;
   GDALClose( hDataset );
+#ifndef RELY_ON_DB
   GDALDestroyDriverManager();
+#endif
   CPLCleanupTLS();
   storeMd5(pszFilename);
Index: trunk/zoo-project/zoo-kernel/service_internal_otb.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_otb.c	(revision 982)
+++ trunk/zoo-project/zoo-kernel/service_internal_otb.c	(revision 984)
@@ -211,5 +211,5 @@
 		}else{
 		  if(type == ParameterType_OutputVectorData){
-		      char* ext="json";
+		      const char* ext="json";
 		      if(tmpVal!=NULL){
 			if(strncasecmp(tmpVal->value,"text/xml",8)==0)
@@ -232,5 +232,5 @@
 		  else
 		    if(type == ParameterType_OutputFilename){
-		      char* ext="txt";
+		      const char* ext="txt";
 		      if(tmpVal!=NULL){
 			if(strncasecmp(tmpVal->value,"text/xml",8)==0)
@@ -308,5 +308,5 @@
 		    char tmp[1024];
 		    map* tmpVal=getMapFromMaps(inputs,paramKey.c_str(),"mimeType");
-		    char* ext="json";
+		    const char* ext="json";
 		    if(tmpVal!=NULL){
 		      if(strncasecmp(tmpVal->value,"application/zip",14)==0){
@@ -362,5 +362,5 @@
 		  else
 		    if(type == ParameterType_InputImage
-		       || type == ParameterType_ComplexInputImage || type == ParameterType_InputVectorData
+		       || type == ParameterType_InputVectorData
 		       || type == ParameterType_InputFilename){
 		      m_Application->SetParameterString(paramKey, test->value);
@@ -403,5 +403,5 @@
 			long count;
 			
-			char *exts[4];
+			const char *exts[4];
 			exts[0]=".shp";
 			exts[1]=".shx";
Index: trunk/zoo-project/zoo-kernel/service_internal_otb.h
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_otb.h	(revision 982)
+++ trunk/zoo-project/zoo-kernel/service_internal_otb.h	(revision 984)
@@ -36,11 +36,8 @@
 #include "service_internal.h"
 #include "service.h"
-#include "cgic.h"
 #ifdef WIN32
 #include <windows.h>
 #include <direct.h>
 #endif
-#include <vector>
-#include <string>
 
 /**
Index: trunk/zoo-project/zoo-kernel/ulinet.h
===================================================================
--- trunk/zoo-project/zoo-kernel/ulinet.h	(revision 982)
+++ trunk/zoo-project/zoo-kernel/ulinet.h	(revision 984)
@@ -34,5 +34,4 @@
 #include "jsapi.h"
 #endif
-#include "fcgi_stdio.h"
 #include <stdlib.h>
 #include <fcntl.h>
Index: trunk/zoo-project/zoo-kernel/zoo_service_loader.c
===================================================================
--- trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 982)
+++ trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 984)
@@ -1886,5 +1886,5 @@
   FILE *f0, *f1;
   HINTERNET hInternet;
-  service *s1;
+  service *s1=NULL;
   maps *request_output_real_format = NULL;
   maps *request_input_real_format = NULL;
@@ -2552,4 +2552,5 @@
       printf("\n");
       fflush(stdout);
+      json_object_put(res);
     }
     //return 1;
@@ -3453,6 +3454,6 @@
 #else
       recordResponse(m,fbkp1);
+#ifdef USE_CALLBACK
       if (eres == SERVICE_SUCCEEDED)
-#ifdef USE_CALLBACK
 	invokeCallback(m,NULL,request_output_real_format,6,0);
 #endif
@@ -3493,7 +3494,9 @@
 #endif
   }
-  
-  freeService (&s1);
-  free (s1);
+
+  if(s1!=NULL){
+    freeService (&s1);
+    free (s1);
+  }
   freeMaps (&m);
   free (m);
Index: trunk/zoo-project/zoo-services/ogr/base-vect-ops/service.c
===================================================================
--- trunk/zoo-project/zoo-services/ogr/base-vect-ops/service.c	(revision 982)
+++ trunk/zoo-project/zoo-services/ogr/base-vect-ops/service.c	(revision 984)
@@ -38,5 +38,4 @@
 #include "service_internal.h"
 
-extern "C" {
 #include <libxml/tree.h>
 #include <libxml/parser.h>
@@ -44,10 +43,5 @@
 #include <libxml/xpathInternals.h>
 
-/*#include <openssl/sha.h>
-#include <openssl/hmac.h>
-#include <openssl/evp.h>
-#include <openssl/bio.h>
-#include <openssl/buffer.h>
-*/
+extern "C" {
 
   void printExceptionReportResponse(maps*,map*);
Index: trunk/zoo-project/zoo-services/utils/open-api/templates/index.html
===================================================================
--- trunk/zoo-project/zoo-services/utils/open-api/templates/index.html	(revision 982)
+++ trunk/zoo-project/zoo-services/utils/open-api/templates/index.html	(revision 984)
@@ -18,10 +18,11 @@
 #import json
 #if "cache_file" in $inputs["tmpl"]
-#set values=json.load(open($inputs["tmpl"]["cache_file"]))
+#set values=json.load(open($inputs["tmpl"]["cache_file"], encoding='utf-8'))
 #else
-#set values=$inputs["tmpl"]["value"]
+#set values=json.loads($inputs["tmpl"]["value"])
 #end if
 #except Exception as e
 $e
+#set values={}
 #end try
 <html lang="en">
@@ -202,5 +203,5 @@
  #end if
 #end if
-#if $obj["maxOccurs"]>1
+#if $obj["maxOccurs"]=="unbounded" or $obj["maxOccurs"]>1
 	<div class="btn-group" role="group" aria-label="Basic example">
 	  <button type="button" class="btn btn-secondary" onclick="addElementToList(\$(this));">Add</button>
@@ -525,5 +526,5 @@
       <hr>
       <address>$openapi["openapi"]["rootUrl"]$(currentUrl).html</address>
-      <!-- hhmts start -->Last modified: Wed Dec 16 16:06:56 CET 2020 <!-- hhmts end -->
+      <!-- hhmts start -->Last modified: Mon Mar  1 17:01:50 CET 2021 <!-- hhmts end -->
     </main>
 #if $currentKey=="root"
