From: Koichi KAMICHI Date: Sat, 27 Mar 2004 14:26:40 +0000 (+0000) Subject: Fixed bug.(GET request detection) X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d256051e0603c035eebbc153b5865663d74db8b9;p=chise%2Fkage.git Fixed bug.(GET request detection) --- diff --git a/kagecgi/kagecgi.c b/kagecgi/kagecgi.c index 4a92461..b96e2bf 100755 --- a/kagecgi/kagecgi.c +++ b/kagecgi/kagecgi.c @@ -27,14 +27,16 @@ int main(int argc, char *argv[]){ //confirm request type = 0; - //argv - tmp1 = g_string_new((gchar *)argv[1]); - if(tmp1->len != 0) type = 1; - //direct + //GET request if(type == 0){ tmp1 = g_string_new((gchar *)getenv("QUERY_STRING")); if(tmp1->len != 0) type = 2; } + //argv(detect after GET request) + if(type == 0){ + tmp1 = g_string_new((gchar *)argv[1]); + if(tmp1->len != 0) type = 1; + } //redirect if(type == 0){ tmp1 = g_string_new((gchar *)getenv("REDIRECT_URL")); @@ -48,7 +50,7 @@ int main(int argc, char *argv[]){ pos = tmp1->str; //separate token - if(type == 1 || type == 2){ //argv or direct + if(type == 1 || type == 2){ //argv or GET request while(1){ cur = strchr(pos, '&'); tmp2 = g_string_new(pos);