summaryrefslogtreecommitdiffhomepage
path: root/request.c
diff options
context:
space:
mode:
Diffstat (limited to 'request.c')
-rw-r--r--request.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/request.c b/request.c
index 15c26f3..d67eab7 100644
--- a/request.c
+++ b/request.c
@@ -217,11 +217,11 @@ int parse_step_path(struct request * request)
// TODO: Return -1 if version is unsupported, meaning other than HTTP/1.1
int parse_step_version(struct request * request)
{
- if (0 >= request->version.start)
+ if (0 >= request->temp.start)
{
- request->version.start = read_until_word(request);
+ request->temp.start = read_until_word(request);
- if (0 == request->version.start)
+ if (0 == request->temp.start)
{
return 0;
}
@@ -234,10 +234,11 @@ int parse_step_version(struct request * request)
return 0;
}
- request->version.length = request->position - request->version.start;
- request->step = parse_step_header_name;
+ request->temp.length = request->position - request->temp.start;
- return parse_step_header_name(request);
+ lua_pushlstring(request->lua, request->data + request->temp.start, request->temp.length);
+
+ PROCEED_TO(parse_step_header_name);
}
/// Parses and verifies name of a single header from the request.