Commit d78f82dd authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Provide short and long descriptions for the request response log records.

parent 06a23d75
......@@ -98,7 +98,7 @@ enum sess_close {
enum {
/* Fields from the first line of HTTP proto */
#define SLTH(aa, bb) bb,
#define SLTH(tag, ind, req, resp, sdesc, ldesc) ind,
#include "tbl/vsl_tags_http.h"
#undef SLTH
};
......
......@@ -121,23 +121,29 @@ SLTM(Length, "Size of object body", "")
SLTM(FetchError, "Error while fetching object", "")
#define SLTH(aa, bb) SLTM(Req##aa, "", "")
#define SLTH(tag, ind, req, resp, sdesc, ldesc) \
SLTM(Req##tag, (req ? "Client request " sdesc : "(unused)"), ldesc)
#include "tbl/vsl_tags_http.h"
#undef SLTH
#define SLTH(aa, bb) SLTM(Resp##aa, "", "")
#define SLTH(tag, ind, req, resp, sdesc, ldesc) \
SLTM(Resp##tag, (resp ? "Client response " sdesc : "(unused)"), ldesc)
#include "tbl/vsl_tags_http.h"
#undef SLTH
#define SLTH(aa, bb) SLTM(Bereq##aa, "", "")
#define SLTH(tag, ind, req, resp, sdesc, ldesc) \
SLTM(Bereq##tag, (req ? "Backend request " sdesc : "(unused)"), ldesc)
#include "tbl/vsl_tags_http.h"
#undef SLTH
#define SLTH(aa, bb) SLTM(Beresp##aa, "", "")
#define SLTH(tag, ind, req, resp, sdesc, ldesc) \
SLTM(Beresp##tag, (resp ? "Backend response " sdesc : "(unused)"), \
ldesc)
#include "tbl/vsl_tags_http.h"
#undef SLTH
#define SLTH(aa, bb) SLTM(Obj##aa, "", "")
#define SLTH(tag, ind, req, resp, sdesc, ldesc) \
SLTM(Obj##tag, (resp ? "Object " sdesc : "(unused)"), ldesc)
#include "tbl/vsl_tags_http.h"
#undef SLTH
......
......@@ -30,12 +30,40 @@
* The order of this table is not random, do not resort.
* In particular, the FIRST and LOST entries must be last, in that order.
*
* Arguments:
* Tag-Name
* struct http header index
* 1 if this header is used in requests
* 1 if this header is used in responses
* short description postfix
* long description (in RST "definition list" format)
*
*/
SLTH(Method, HTTP_HDR_METHOD)
SLTH(URL, HTTP_HDR_URL)
SLTH(Protocol, HTTP_HDR_PROTO)
SLTH(Status, HTTP_HDR_STATUS)
SLTH(Response, HTTP_HDR_RESPONSE)
SLTH(Header, HTTP_HDR_FIRST)
SLTH(Lost, HTTP_HDR_LOST)
SLTH(Method, HTTP_HDR_METHOD, 1, 0, "method",
"The HTTP request method used.\n\n"
)
SLTH(URL, HTTP_HDR_URL, 1, 0, "URL",
"The HTTP request URL.\n\n"
)
SLTH(Protocol, HTTP_HDR_PROTO, 1, 1, "protocol",
"The HTTP protocol version information.\n\n"
)
SLTH(Status, HTTP_HDR_STATUS, 0, 1, "status",
"The HTTP status code received.\n\n"
)
SLTH(Response, HTTP_HDR_RESPONSE, 0, 1, "response",
"The HTTP response string received.\n\n"
)
SLTH(Header, HTTP_HDR_FIRST, 1, 1, "header",
"HTTP header contents.\n\n"
"The format is::\n\n"
"\t%s: %s\n"
"\t| |\n"
"\t| +- Header value\n"
"\t+----- Header name\n"
"\n"
)
SLTH(Lost, HTTP_HDR_LOST, 1, 1, "(unused)",
""
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment