Changeset 328
- Timestamp:
- Aug 26, 2011, 3:53:26 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/thirds/cgic206/cgic.c
r216 r328 237 237 238 238 239 cgiTreatUrlEncoding= 1;239 cgiTreatUrlEncoding=0; 240 240 if (cgiStrEqNc(cgiRequestMethod, "post")) { 241 241 cgiTreatUrlEncoding=0; -
trunk/zoo-project/HISTORY.txt
r303 r328 1 Version 1.3.0-dev 2 3 * Support for dataInputs URLEncoded and xlink:href (ticket #62) 4 * Use the same object structure for JavaScript arguments than for Python 5 1 6 Version 1.2.0-rc3 2 7 -
trunk/zoo-project/zoo-kernel/service_internal.h
r291 r328 92 92 void URLDecode(char *); 93 93 char *url_encode(char *); 94 char *url_decode(char *); 94 95 char* getEncoding(maps*); 95 96 -
trunk/zoo-project/zoo-kernel/service_internal_js.c
r287 r328 77 77 78 78 /* Create the global object. */ 79 //global = JS_NewCompartmentAndGlobalObject(cx, &global_class, NULL); 80 global = JS_NewObject(cx, &global_class, NULL,NULL); 79 //#ifdef JS_NewCompartmentAndGlobalObject 80 global = JS_NewCompartmentAndGlobalObject(cx, &global_class, NULL); 81 //#else 82 //global = JS_NewObject(cx, &global_class, NULL,NULL); 83 //#endif 81 84 82 85 /* Populate the global object with the standard globals, … … 284 287 285 288 JSObject* JSObject_FromMaps(JSContext *cx,maps* t){ 286 JSObject *res = JS_NewArrayObject(cx, 0, NULL); 289 290 JSObject* res=JS_NewObject(cx, NULL, NULL, NULL); 291 //JSObject *res = JS_NewArrayObject(cx, 0, NULL); 287 292 if(res==NULL) 288 293 fprintf(stderr,"Array Object is NULL!\n"); 289 294 maps* tmp=t; 295 290 296 while(tmp!=NULL){ 291 297 jsuint len; … … 293 299 JSObject *pval=JSObject_FromMap(cx,tmp->content); 294 300 jsval pvalj=OBJECT_TO_JSVAL(pval); 295 JS_SetProperty(cx, res1, tmp->name, &pvalj); 296 JS_GetArrayLength(cx, res, &len); 297 jsval res1j = OBJECT_TO_JSVAL(res1); 298 JS_SetElement(cx,res,len,&res1j); 301 JS_SetProperty(cx, res, tmp->name, &pvalj); 302 299 303 #ifdef JS_DEBUG 300 304 fprintf(stderr,"Length of the Array %d, element : %s added \n",len,tmp->name); -
trunk/zoo-project/zoo-kernel/zoo_service_loader.c
r296 r328 924 924 * Put each DataInputs into the inputs_as_text array 925 925 */ 926 char *tmp1=strdup(cursor_input); 926 927 char * pToken; 927 928 pToken=strtok(cursor_input,";"); 929 if(pToken!=NULL && strncasecmp(pToken,tmp1,strlen(tmp1))==0){ 930 char* tmp2=url_decode(tmp1); 931 snprintf(cursor_input,(strlen(tmp2)+1)*sizeof(char),"%s",tmp2); 932 free(tmp2); 933 pToken=strtok(cursor_input,";"); 934 } 935 free(tmp1); 936 928 937 char** inputs_as_text=(char**)calloc(100,sizeof(char*)); 929 938 if(inputs_as_text == NULL){ … … 1019 1028 else 1020 1029 if(tmpv1!=NULL){ 1021 if(strncasecmp(tmpv1+1,"http://",7)!=0 && 1022 strncasecmp(tmpv1+1,"ftp://",6)!=0){ 1030 char *tmpx2=url_decode(tmpv1+1); 1031 if(strncasecmp(tmpx2,"http://",7)!=0 && 1032 strncasecmp(tmpx2,"ftp://",6)!=0){ 1023 1033 char emsg[1024]; 1024 1034 sprintf(emsg,_("Unable to find a valid protocol to download the remote file %s"),tmpv1+1); … … 1036 1046 fprintf(stderr,"REQUIRE TO DOWNLOAD A FILE FROM A SERVER : url(%s)\n",tmpv1+1); 1037 1047 #endif 1038 char *tmpx=url_encode(tmpv1+1); 1039 addToMap(tmpmaps->content,tmpn1,tmpx); 1048 addToMap(tmpmaps->content,tmpn1,tmpx2); 1040 1049 1041 1050 #ifndef WIN32 … … 1043 1052 #endif 1044 1053 { 1045 loadRemoteFile(m,tmpmaps->content,hInternet,tmp v1+1);1054 loadRemoteFile(m,tmpmaps->content,hInternet,tmpx2); 1046 1055 } 1047 char *tmpx1=url_encode(tmpv1+1); 1048 addToMap(tmpmaps->content,tmpn1,tmpx1); 1049 free(tmpx1); 1056 free(tmpx2); 1050 1057 addToMap(tmpmaps->content,"Reference",tmpv1+1); 1051 1058 }
Note: See TracChangeset
for help on using the changeset viewer.