diff options
Diffstat (limited to 'request.c')
-rw-r--r-- | request.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -185,11 +185,12 @@ int parse_step_method(struct request * request) // TODO: Consider spliting path into an actual path and arguments in this stage int parse_step_path(struct request * request) { - if (0 >= request->path.start) + // TODO: Rethink interface of parse_step_* and read_* functions. After a break it looks like mess; it's a bad sign. + if (0 >= request->temp.start) { - request->path.start = read_until_word(request); + request->temp.start = read_until_word(request); - if (0 == request->path.start) + if (0 == request->temp.start) { return 0; } @@ -202,10 +203,12 @@ int parse_step_path(struct request * request) return 0; } - request->path.length = request->position - request->path.start; - request->step = parse_step_version; + request->temp.length = request->position - request->temp.start; - return parse_step_version(request); + // TODO: Use macro for pushing temporary span. Also clear the span in that macro instead of PROCEED_TO. + lua_pushlstring(request->lua, request->data + request->temp.start, request->temp.length); + + PROCEED_TO(parse_step_version); } /// Parses and verifies http version field of the request. |