# HG changeset patch # User jbe # Date 1469478437 -7200 # Node ID 59a6f485176497ef21d1efea9bd8ee90af6db584 # Parent e2389cc82214e8cf1ea354a6579f4fbc963e0c87 Added request.get_header{...} function diff -r e2389cc82214 -r 59a6f4851764 framework/env/request/get_header.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/framework/env/request/get_header.lua Mon Jul 25 22:27:17 2016 +0200 @@ -0,0 +1,13 @@ +--[[-- +value = -- value of header as string containing comma (and space) separated values +request.get_header( + key -- name of header, e.g. "Authorization" +) + +Returns the value of an HTTP header sent by the client. If the header occurs multiple times, the values are concatenated with a comma and zero or more space characters (e.g. "value1, value2"). + +--]]-- + +function request.get_header(key) + return request._http_request.headers_csv_string[key] +end