25 #include <sys/types.h>
37 HttpRequest request = (HttpRequest)this->current;
38 char * delim = strchr(request->uri,
'?');
41 delim = request->uri + strlen(request->uri);
44 request->path =
memMalloc(delim - request->uri + 1);
45 request->path[delim - request->uri] = 0;
46 memcpy(request->path, request->uri, delim - request->uri);
48 while(NULL != delim && 0 != *delim) {
49 char * key = delim + 1;
50 char * eqsign = strchr(key,
'=');
58 delim = strchr(eqsign,
'&');
61 delim = key + strlen(key);
64 nvalue = delim-eqsign-1;
65 value = (0 != nvalue)? eqsign+1 : NULL;
68 new(HashValue, key, eqsign-key, value, nvalue));
void httpParserRequestVars(HttpParser this)
void * hashAdd(Hash, void *)