} else if (strcmp(query, "query") == 0) { char** ans = processRDFQuery(val); if (ans) { int n = 0; for (n = 0; ans[n] != 0; n++) { WriteClient(obj, ans[n]); } }
Run(ServerSession_t obj){  char* query = (char*) malloc(300);  char* val;  char* cookie;  WAIgetRequestInfo(obj, "QUERY",  &query);    WAIgetCookie(obj, &cookie);   if (!query) return 0;  printf("Query = %s. Cookie = %s\n", query, cookie);  val = strchr(query, '=');  if (!val) return 0;  val++;  *(val -1) = '\0';  WAIStartResponse(obj);  /*  WriteClient(obj, PREFIX); */    if (strcmp(query, "browse") == 0) {    AnswerOpenDirQuery(WriteClient, obj, val, cookie);  } else if (strcmp(query, "search") == 0) {    AnswerSearchQuery(WriteClient, obj, val, cookie);  }  /*  WriteClient(obj, POSTFIX); */  return 0;}