summaryrefslogtreecommitdiffhomepage
path: root/response.c
diff options
context:
space:
mode:
Diffstat (limited to 'response.c')
-rw-r--r--response.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/response.c b/response.c
index 8866bd1..4f70b0d 100644
--- a/response.c
+++ b/response.c
@@ -32,7 +32,7 @@ int response_send(lua_State * L, const int fd)
char * buffer = malloc(bytes_total);
char * new_buffer = NULL;
- lua_pushstring(L, "status");
+ lua_pushliteral(L, "status");
lua_gettable(L, -2);
const lua_Integer status = lua_tointeger(L, -1);
lua_pop(L, 1);
@@ -46,7 +46,7 @@ int response_send(lua_State * L, const int fd)
bytes_used = snprintf(buffer, bytes_total, "HTTP/1.1 %d\r\n\r\n", (int) status) - 2;
- lua_pushstring(L, "headers");
+ lua_pushliteral(L, "headers");
lua_gettable(L, -2);
if (0 == lua_istable(L, -1))
@@ -106,7 +106,7 @@ int response_send(lua_State * L, const int fd)
buffer[bytes_used + 1] = '\n';
bytes_used += 2;
- lua_pushstring(L, "data");
+ lua_pushliteral(L, "data");
lua_gettable(L, -2);
size_t data_length = 0;
const char * data = lua_tolstring(L, -1, &data_length);