Index: trunk/zoo-project/zoo-kernel/response_print.c
===================================================================
--- trunk/zoo-project/zoo-kernel/response_print.c	(revision 925)
+++ trunk/zoo-project/zoo-kernel/response_print.c	(revision 926)
@@ -23,8 +23,4 @@
  */
 
-#include "service.h"
-#include "service_internal.h"
-#include "server_internal.h"
-#include "response_print.h"
 #ifdef USE_MS
 #include "service_internal_ms.h"
@@ -35,4 +31,8 @@
 #include "service_callback.h"
 #endif
+#include "service.h"
+#include "service_internal.h"
+#include "server_internal.h"
+#include "response_print.h"
 
 #ifndef WIN32
@@ -41,5 +41,4 @@
 
 #include "mimetypes.h"
-
 
 /**
@@ -1014,5 +1013,4 @@
 
   n=nc;
-  
   int wpsId=zooXmlAddNs(NULL,schemas[vid][3],"wps");
   ns=usedNs[wpsId];
@@ -1427,5 +1425,5 @@
 	int oI=0;
 	/*if(vid==0)*/ {
-	  for(oI=0;oI<13;oI++)
+	  for(oI=0;oI<12;oI++)
 	    if((tmp1=getMap(_tmp->content,orderedFields[oI]))!=NULL){
 #ifdef DEBUG
@@ -2101,5 +2099,4 @@
     printf("Content-Type: text/xml; charset=%s\r\nStatus: 200 OK\r\n\r\n",encoding);
   }
-  fflush(stdout);
   xmlChar *xmlbuff;
   int buffersize;
Index: trunk/zoo-project/zoo-kernel/response_print.h
===================================================================
--- trunk/zoo-project/zoo-kernel/response_print.h	(revision 925)
+++ trunk/zoo-project/zoo-kernel/response_print.h	(revision 926)
@@ -94,4 +94,5 @@
 #include <libxml/parser.h>
 #include <libxml/xpath.h>
+#include "cgic.h"
 
 #ifdef __cplusplus
Index: trunk/zoo-project/zoo-kernel/service_callback.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_callback.c	(revision 925)
+++ trunk/zoo-project/zoo-kernel/service_callback.c	(revision 926)
@@ -435,5 +435,5 @@
       maps* curs=inputs;
       dumpMaps(curs);
-      char *keys[11][2]={
+      const char *keys[11][2]={
 	{
 	  "xlink:href",
@@ -614,5 +614,5 @@
       maps* curs=outputs;
       dumpMaps(curs);
-      char *keys[10][2]={
+      const char *keys[10][2]={
 	{
 	  "Reference",
@@ -656,5 +656,5 @@
 	}	
       };
-      char* specifics[5][2]={
+      const char* specifics[5][2]={
 	{
 	  "download_link",
@@ -767,5 +767,5 @@
     case 6: {
       // Finalize HPC
-      char *keys[6][2]={
+      const char *keys[6][2]={
 	{
 	  //"SubmitTime",
Index: trunk/zoo-project/zoo-kernel/service_internal_python.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_python.c	(revision 925)
+++ trunk/zoo-project/zoo-kernel/service_internal_python.c	(revision 926)
@@ -351,5 +351,5 @@
   PyObject *ptype, *pvalue, *ptraceback,*pValue,*pArgs;
   PyErr_Fetch(&ptype, &pvalue, &ptraceback);
-  char *pStrErrorMessage = PyString_AsString(pvalue);
+  const char *pStrErrorMessage = PyString_AsString(pvalue);
   char *tmp0=_("Python module %s cannot be loaded. Message: %s\n");
   
@@ -698,5 +698,5 @@
     if(strncmp(PyString_AsString(key),"child",5)!=0){
       if(strncmp(PyString_AsString(key),"value",5)==0){
-	char *buffer=NULL;
+	const char *buffer=NULL;
 	Py_ssize_t size;
 #if PY_MAJOR_VERSION >= 3
@@ -720,6 +720,6 @@
 	res = addToMapWithSize(res,PyString_AsString(key),buffer,size);
       }else{
-	char* lkey=PyString_AsString(key);
-	char* lvalue=PyString_AsString(value);
+	const char* lkey=PyString_AsString(key);
+	const char* lvalue=PyString_AsString(value);
 	if(res!=NULL){
 	  if(PyString_Size(value)>0)
@@ -759,5 +759,5 @@
 	PyObject* key;
 	PyObject* value;
-	char *buffer = NULL;
+	const char *buffer = NULL;
 	Py_ssize_t size;
 	for(int i = 0; i < nb; i++) {
Index: trunk/zoo-project/zoo-kernel/sqlapi.c
===================================================================
--- trunk/zoo-project/zoo-kernel/sqlapi.c	(revision 925)
+++ trunk/zoo-project/zoo-kernel/sqlapi.c	(revision 926)
@@ -71,5 +71,4 @@
   maps* cconf=getMaps(conf,key);
   if(cconf==NULL){
-    fprintf(stderr,"%s %d\n",__FILE__,__LINE__);
     return "-1";
   }
Index: trunk/zoo-project/zoo-kernel/sqlapi.h
===================================================================
--- trunk/zoo-project/zoo-kernel/sqlapi.h	(revision 925)
+++ trunk/zoo-project/zoo-kernel/sqlapi.h	(revision 926)
@@ -51,5 +51,4 @@
 #endif
 
-  
 #ifdef META_DB
   ZOO_DLL_EXPORT char* _createInitString(maps*,const char*);
Index: trunk/zoo-project/zoo-kernel/zoo_service_loader.c
===================================================================
--- trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 925)
+++ trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 926)
@@ -1240,4 +1240,12 @@
   }else{
     checkValidValue(request_inputs,&err,"AcceptVersions",(const char**)vvv,-1);
+    map* tmpMap=getMapFromMaps(m,"main","version");
+    if(tmpMap!=NULL){
+      setMapInMaps(m,"main","rversion",tmpMap->value);
+      addToMap(request_inputs,"version",tmpMap->value);
+    }else{
+      setMapInMaps(m,"main","rversion","1.0.0");
+      addToMap(request_inputs,"version","1.0.0");
+    }
     map* version1=getMap(request_inputs,"AcceptVersions");
     if(version1!=NULL){
@@ -1247,6 +1255,4 @@
 	addToMap(request_inputs,"version",version1->value);
       version=getMap(request_inputs,"version");
-      setMapInMaps(m,"main","rversion",version->value);
-      vid=getVersionId(version->value);
     }
   }
