Browse Source

support iguana/* files from port7778 html

release/v0.1
jl777 9 years ago
parent
commit
67dcb2b994
  1. 6
      iguana/iguana_rpc.c

6
iguana/iguana_rpc.c

@ -705,7 +705,7 @@ cJSON *SuperNET_urlconv(char *value,int32_t bufsize,char *urlstr)
char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *postflagp,char *urlstr,char *remoteaddr)
{
cJSON *tokens,*argjson,*json = 0; long filesize;
char symbol[16],buf[4096],urlmethod[16],*data,url[1024],*retstr,*filestr,*token = 0; int32_t i,j,n,num=0;
char symbol[16],buf[4096],helpfname[512],urlmethod[16],*data,url[1024],*retstr,*filestr,*token = 0; int32_t i,j,n,num=0;
//printf("rpcparse.(%s)\n",urlstr);
for (i=0; i<sizeof(urlmethod)-1&&urlstr[i]!=0&&urlstr[i]!=' '; i++)
urlmethod[i] = urlstr[i];
@ -718,7 +718,7 @@ char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsiz
url[i++] = 0;
n += i;
j = i = 0;
//printf("url.(%s) method.(%s)\n",&url[i],urlmethod);
//printf("url.(%s) method.(%s) helpfname.(%s)\n",&url[i],urlmethod,helpfname);
if ( strcmp(&url[i],"/") == 0 && strcmp(urlmethod,"GET") == 0 )
{
*jsonflagp = 1;
@ -729,6 +729,8 @@ char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsiz
}
return(filestr);
}
else if ( (filestr= OS_filestr(&filesize,url+1)) != 0 )
return(filestr);
if ( strncmp(&url[i],"/api",strlen("/api")) == 0 )
{
*jsonflagp = 1;

Loading…
Cancel
Save