- Timestamp:
- Feb 27, 2018, 4:17:05 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/prototype-v0/zoo-project/zoo-kernel/request_parser.c
r867 r871 933 933 tmpmaps->content = 934 934 createMap (list[l], (char *) val); 935 xmlFree (val); 935 936 } 936 xmlFree (val); 937 else{ 938 if(l==0){ 939 if (tmpmaps->content != NULL) 940 addToMap (tmpmaps->content, list[l], 941 "string"); 942 else 943 tmpmaps->content = 944 createMap (list[l],"string"); 945 } 946 } 937 947 free (list[l]); 938 948 } … … 959 969 tmpmaps->content = 960 970 createMap (coms[l], (char *) val); 971 xmlFree (val); 961 972 } 962 xmlFree (val);963 973 } 964 974 } 965 975 966 976 map *test = getMap (tmpmaps->content, "encoding"); 967 977 968 978 if (test == NULL) 969 { 979 { 970 980 if (tmpmaps->content != NULL) 971 981 addToMap (tmpmaps->content, "encoding", … … 977 987 } 978 988 979 if ( strcasecmp (test->value, "base64") != 0)989 if (getMap(tmpmaps->content,"dataType")==NULL && test!=NULL && strcasecmp (test->value, "base64") != 0) 980 990 { 981 991 xmlChar *mv = xmlNodeListGetString (doc, … … 983 993 1); 984 994 map *ltmp = 985 getMap (tmpmaps->content, "mimeType"); 995 getMap (tmpmaps->content, "mimeType"); 986 996 if (mv == NULL 987 997 || … … 1068 1078 else 1069 1079 { 1070 xmlChar *tmp = xmlNodeListGetRawString (doc, 1071 cur4->xmlChildrenNode, 1072 0); 1073 addToMap (tmpmaps->content, "value", 1074 (char *) tmp); 1075 xmlFree (tmp); 1080 xmlNodePtr cur5 = cur4->children; 1081 while (cur5 != NULL 1082 && cur5->type != XML_CDATA_SECTION_NODE) 1083 cur5 = cur5->next; 1084 if (cur5 != NULL 1085 && cur5->type == XML_CDATA_SECTION_NODE) 1086 { 1087 addToMap (tmpmaps->content, 1088 "value", 1089 (char *) cur5->content); 1090 } 1091 else{ 1092 if(cur4->xmlChildrenNode!=NULL){ 1093 xmlChar *tmp = xmlNodeListGetRawString (doc, 1094 cur4->xmlChildrenNode, 1095 0); 1096 addToMap (tmpmaps->content, "value", 1097 (char *) tmp); 1098 xmlFree (tmp); 1099 } 1100 } 1076 1101 } 1077 1102
Note: See TracChangeset
for help on using the changeset viewer.