250 } else if(absPath.ptr[0] == '*') { |
250 } else if(absPath.ptr[0] == '*') { |
251 // TODO: implement global OPTIONS #71 |
251 // TODO: implement global OPTIONS #71 |
252 return 1; |
252 return 1; |
253 } |
253 } |
254 |
254 |
255 cxmutstr query; |
|
256 query.length = 0; |
|
257 |
|
258 for(int i=0;i<request->uri.length;i++) { |
255 for(int i=0;i<request->uri.length;i++) { |
259 if(request->uri.ptr[i] == '?') { |
256 if(request->uri.ptr[i] == '?') { |
|
257 cxmutstr query; |
|
258 query.ptr = NULL; |
|
259 query.length = 0; |
|
260 |
260 /* split uri in path and query */ |
261 /* split uri in path and query */ |
261 if(absPath.length > i + 2) { |
262 if(absPath.length > i + 2) { |
262 query.length = absPath.length - i - 1; |
263 query.length = absPath.length - i - 1; |
263 query.ptr = absPath.ptr + i + 1; |
264 query.ptr = absPath.ptr + i + 1; |
264 } |
265 } |
265 absPath.length = i; |
266 absPath.length = i; |
266 |
267 |
267 // Pass any query as 'query' in reqpb |
268 // Pass any query as 'query' in reqpb |
268 pblock_kvinsert( |
269 if(query.length > 0) { |
|
270 pblock_kvinsert( |
269 pb_key_query, |
271 pb_key_query, |
270 query.ptr, |
272 query.ptr, |
271 query.length, |
273 query.length, |
272 rq->rq.reqpb); |
274 rq->rq.reqpb); |
|
275 } |
273 |
276 |
274 break; |
277 break; |
275 } |
278 } |
276 } |
279 } |
277 |
280 |