mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-19 12:16:59 +00:00
MEDIUM: filters/lua: Add HTTPMessage class to help HTTP filtering
This new class exposes methods to manipulate HTTP messages from a filter written in lua. Like for the HTTP class, there is a bunch of methods to manipulate the message headers. But there are also methods to manipulate the message payload. This part is similar to what is available in the Channel class. Thus the payload can be duplicated, erased, modified or forwarded. For now, only DATA blocks can be retrieved and modified because the current API is limited. No HTTPMessage method is able to yield. Those manipulating the headers are always called on messages containing all the headers, so there is no reason to yield. Those manipulating the payload are called from the http_payload filters callback function where yielding is forbidden. When an HTTPMessage object is instantiated, the underlying Channel object can be retrieved via the ".channel" field. For now this class is not used because the HTTP filtering is not supported yet. It will be the purpose of another commit. There is no documentation for now.
This commit is contained in:
parent
c404f1126c
commit
df97ac4584
@ -42,6 +42,7 @@
|
||||
#define CLASS_SOCKET "Socket"
|
||||
#define CLASS_CHANNEL "Channel"
|
||||
#define CLASS_HTTP "HTTP"
|
||||
#define CLASS_HTTP_MSG "HTTPMessage"
|
||||
#define CLASS_MAP "Map"
|
||||
#define CLASS_APPLET_TCP "AppletTCP"
|
||||
#define CLASS_APPLET_HTTP "AppletHTTP"
|
||||
|
1058
src/hlua.c
1058
src/hlua.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user