Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
48b2ec763e
  1. 6
      iguana/iguana_rpc.c

6
iguana/iguana_rpc.c

@ -704,7 +704,8 @@ 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; char symbol[16],buf[4096],urlmethod[16],*data,url[1024],*retstr,*token = 0; int32_t i,j,n,num=0;
cJSON *tokens,*argjson,*json = 0; long filesize;
char symbol[16],buf[4096],urlmethod[16],*data,url[1024],*retstr,*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];
@ -717,6 +718,9 @@ char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsiz
url[i++] = 0;
n += i;
j = i = 0;
if ( strcmp(&url[i],"/") == 0 && strcmp(urlmethod,"GET") == 0 )
return(OS_filestr(&filesize,"index7778.html"));
printf("url.(%s) method.(%s)\n",&url[i],urlmethod);
if ( strncmp(&url[i],"/api",strlen("/api")) == 0 )
{
*jsonflagp = 1;

Loading…
Cancel
Save