- Timestamp:
- Feb 25, 2018, 3:06:51 PM (7 years ago)
- Location:
- branches/prototype-v0/zoo-project/zoo-kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/prototype-v0/zoo-project/zoo-kernel/configure.ac
r839 r867 112 112 #============================================================================ 113 113 114 AC_ARG_WITH([gettext],115 [AS_HELP_STRING([--with-gettext=PATH], [Specifies an alternative location for the openssl library])],116 [GETTEXT_DIR="$withval"], [GETTEXT_DIR="/usr/"])117 GETTEXT_CFLAGS="-I$GETTEXT_DIR/include"118 GETTEXT_LDFLAGS="-L$GETTEXT_DIR/lib -lintl"119 CFLAGS_SAVE="$CFLAGS"120 CFLAGS="$GETTEXT_CFLAGS"121 LIBS_SAVE="$LIBS"122 LIBS="$GETTEXT_LDFLAGS"123 AM_GNU_GETTEXT([external], [], [])124 AC_CHECK_LIB(intl,125 [dgettext], [] , [AC_MSG_ERROR([could not find $i function in gettext library])])114 #AC_ARG_WITH([gettext], 115 # [AS_HELP_STRING([--with-gettext=PATH], [Specifies an alternative location for the openssl library])], 116 # [GETTEXT_DIR="$withval"], [GETTEXT_DIR="/usr/"]) 117 #GETTEXT_CFLAGS="-I$GETTEXT_DIR/include" 118 #GETTEXT_LDFLAGS="-L$GETTEXT_DIR/lib -lintl" 119 #CFLAGS_SAVE="$CFLAGS" 120 #CFLAGS="$GETTEXT_CFLAGS" 121 #LIBS_SAVE="$LIBS" 122 #LIBS="$GETTEXT_LDFLAGS" 123 #AM_GNU_GETTEXT([external], [], []) 124 #AC_CHECK_LIB(intl, 125 # [dgettext], [] , [AC_MSG_ERROR([could not find $i function in gettext library])]) 126 126 AC_SUBST([GETTEXT_CFLAGS]) 127 127 AC_SUBST([GETTEXT_LDFLAGS]) -
branches/prototype-v0/zoo-project/zoo-kernel/request_parser.c
r864 r867 905 905 } 906 906 907 908 907 while (cur4 != NULL) 909 908 { … … 979 978 980 979 if (strcasecmp (test->value, "base64") != 0) 981 { 980 { 982 981 xmlChar *mv = xmlNodeListGetString (doc, 983 982 cur4->xmlChildrenNode, … … 1007 1006 &buffersize, 1008 1007 "utf-8", 0); 1008 xmlFreeDoc (doc1); 1009 1009 } 1010 1010 else … … 1022 1022 addIntToMap (tmpmaps->content, "size", 1023 1023 buffersize); 1024 xmlFreeDoc (doc1);1025 1024 }else{ 1026 xmlNodePtr cur5 = cur4->children; 1027 while (cur5 != NULL 1028 && cur5->type != XML_CDATA_SECTION_NODE) 1029 cur5 = cur5->next; 1030 if (cur5 != NULL 1031 && cur5->type == XML_CDATA_SECTION_NODE){ 1032 xmlFree(mv); 1033 mv=xmlStrdup(cur5->content); 1025 if(xmlStrcasecmp 1026 (cur4->name, BAD_CAST "BoundingBoxData") == 0){ 1027 xmlDocPtr doc1 = xmlNewDoc(BAD_CAST "1.0"); 1028 int buffersize; 1029 xmlDocSetRootElement(doc1,cur4); 1030 xmlDocDumpFormatMemoryEnc(doc1,&mv, 1031 &buffersize, 1032 "utf-8",0); 1033 addIntToMap (tmpmaps->content, "size", 1034 buffersize); 1035 xmlParseBoundingBox(main_conf,&tmpmaps->content,doc1); 1036 }else{ 1037 xmlNodePtr cur5 = cur4->children; 1038 while (cur5 != NULL 1039 && cur5->type != XML_ELEMENT_NODE 1040 && cur5->type != XML_CDATA_SECTION_NODE) 1041 cur5 = cur5->next; 1042 if (cur5 != NULL 1043 && cur5->type != XML_CDATA_SECTION_NODE) 1044 { 1045 xmlDocPtr doc1 = xmlNewDoc (BAD_CAST "1.0"); 1046 int buffersize; 1047 xmlDocSetRootElement (doc1, cur5); 1048 xmlDocDumpFormatMemoryEnc (doc1, &mv, 1049 &buffersize, 1050 "utf-8", 0); 1051 addIntToMap (tmpmaps->content, "size", 1052 buffersize); 1053 } 1054 else /*if (cur5 != NULL 1055 && cur5->type == XML_CDATA_SECTION_NODE)*/{ 1056 xmlFree(mv); 1057 mv=xmlStrdup(cur5->content); 1058 } 1034 1059 } 1035 1060 } … … 1102 1127 } 1103 1128 return 1; 1129 } 1130 1131 /** 1132 * Parse a BoundingBoxData node 1133 * 1134 * http://schemas.opengis.net/ows/1.1.0/owsCommon.xsd: BoundingBoxType 1135 * 1136 * A map to store boundingbox information will contain: 1137 * - LowerCorner : double double (minimum within this bounding box) 1138 * - UpperCorner : double double (maximum within this bounding box) 1139 * - crs : URI (Reference to definition of the CRS) 1140 * - dimensions : int 1141 * 1142 * @param main_conf the conf maps containing the main.cfg settings 1143 * @param request_inputs the map storing KVP raw value 1144 * @param doc the xmlDocPtr containing the BoudingoxData node 1145 * @return a map containing all the bounding box keys 1146 */ 1147 int xmlParseBoundingBox(maps** main_conf,map** current_input,xmlDocPtr doc){ 1148 xmlNode *root_element = xmlDocGetRootElement(doc); 1149 for(xmlAttrPtr attr = root_element->properties; NULL != attr; attr = attr->next){ 1150 xmlChar *val = xmlGetProp (root_element, BAD_CAST attr->name); 1151 addToMap(*current_input,(char*)attr->name,(char*)val); 1152 xmlFree(val); 1153 xmlNodePtr cur = root_element->children; 1154 while(cur!=NULL && cur->type != XML_ELEMENT_NODE) 1155 cur=cur->next; 1156 while(cur!=NULL && cur->type==XML_ELEMENT_NODE){ 1157 xmlChar *val = 1158 xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); 1159 addToMap(*current_input,(char*)cur->name,(char*)val); 1160 cur=cur->next; 1161 xmlFree(val); 1162 while(cur!=NULL && cur->type != XML_ELEMENT_NODE) 1163 cur=cur->next; 1164 } 1165 } 1104 1166 } 1105 1167 -
branches/prototype-v0/zoo-project/zoo-kernel/request_parser.h
r854 r867 44 44 int kvpParseOutputs(maps**,map *,maps**); 45 45 int xmlParseInputs(maps**,service*,maps**,xmlDocPtr,xmlNodeSet*,HINTERNET*); 46 int xmlParseBoundingBox(maps** main_conf,map** current_input,xmlDocPtr doc); 46 47 int xmlParseOutputs(maps**,map**,maps**,xmlDocPtr,xmlNodePtr,bool); 47 48 int xmlParseRequest(maps**,const char*,map**,service*,maps**,maps**,HINTERNET*); -
branches/prototype-v0/zoo-project/zoo-kernel/response_print.c
r862 r867 2623 2623 if(tmpSess!=NULL){ 2624 2624 map *_tmp=getMapFromMaps(m,"lenv","cookie"); 2625 maps *tmps=getMaps(m,"senv"); 2625 2626 char* sessId=NULL; 2626 2627 if(_tmp!=NULL){ 2627 2628 printf("Set-Cookie: %s; HttpOnly\r\n",_tmp->value); 2629 map *_tmp1=getMapFromMaps(m,"senv","ecookie_length"); 2630 if(_tmp1!=NULL){ 2631 int len=atoi(_tmp1->value); 2632 int cnt=0; 2633 for(cnt=0;cnt<len;cnt++){ 2634 map* _tmp2=getMapArray(tmps->content,"ecookie",cnt); 2635 if(_tmp2!=NULL) 2636 printf("Set-Cookie: %s; HttpOnly\r\n",_tmp->value); 2637 } 2638 } 2628 2639 printf("P3P: CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"\r\n"); 2629 2640 char session_file_path[100]; -
branches/prototype-v0/zoo-project/zoo-kernel/service_internal_ms.c
r865 r867 81 81 */ 82 82 int getPublishedId(maps* elem){ 83 map* myIndex=getMap(elem->content,"published_id"); 84 if(myIndex!=NULL){ 85 return atoi(myIndex->value); 83 if(elem!=NULL && elem->content!=NULL){ 84 map* myIndex=getMap(elem->content,"published_id"); 85 if(myIndex!=NULL){ 86 return atoi(myIndex->value); 87 } 86 88 } 87 89 return 0; 88 90 } 91 89 92 /** 90 93 * Add width and height keys to an output maps containing the maximum width … … 243 246 else 244 247 sprintf(layers,options[proto][3],layerName->value); 245 248 246 249 if(format==NULL || width==NULL || height==NULL || extent==NULL){ 247 250 char tmpStr[1024];
Note: See TracChangeset
for help on using the changeset viewer.