Commit Graph

16 Commits (77b94b8713d8fb3e88c445be69b9ecf9f2f2e521)

Author SHA1 Message Date
Philippe Antoine 44a363f2f9 http: minor cleanups for lua
In preparation of libhtp rust

Mainly adding some const
7 months ago
Philippe Antoine 72c08cb94e http: htp_headers_t alias for htp_table_t
In preparation of libhtp rust
7 months ago
Philippe Antoine 42ed59aa21 http: aliases for htp opaque htp_headers_t
In preparation of libhtp rust
7 months ago
Philippe Antoine b0db4e2dbe http: aliases for htp opaque htp_header_t
In preparation of libhtp rust
7 months ago
Philippe Antoine 82e31e14c0 http: use alias for htp opaque htp_tx_t
In preparation of libhtp rust

This occurence was missed in 23050d70ed
7 months ago
Philippe Antoine 9a8e377a7a http: include htp-libhtp.h from header
Instead of C files requiring it.
In preparation of libhtp rust, to minimize the final commit.
7 months ago
Philippe Antoine 23050d70ed http: aliases for htp opaque htp_tx_t
In preparation of libhtp rust
7 months ago
Jason Ish 10a367b116 lua: use quoted include style to avoid system includes
Use quoted include style for Lua includes ("lua.h" instead of <lua.h>)
as this could result in system includes being picked up instead of the
includes from our vendor directory.
1 year ago
Jason Ish 2e440169d6 lua: remove lua as a compile time feature
Its always built-in. However, can be disabled at runtime.
1 year ago
Victor Julien e250ef6402 debug: remove empty header 3 years ago
Philippe Antoine 707f027231 protos: renaming ALPROTO_HTTP* constants
Having now ALPROTO_HTTP1, ALPROTO_HTTP2 and ALPROTO_HTTP

Run with 3 sed commands
git grep ALPROTO_HTTP | cut -d: -f1 | uniq |
 xargs sed -i -e 's/ALPROTO_HTTP/ALPROTO_HTTP1/g'
git grep ALPROTO_HTTP12 | cut -d: -f1 | uniq |
 xargs sed -i -e 's/ALPROTO_HTTP12/ALPROTO_HTTP2/g'
git grep ALPROTO_HTTP1_ANY | cut -d: -f1 | uniq |
 xargs sed -i -e 's/ALPROTO_HTTP1_ANY/ALPROTO_HTTP/g'

and then running clang-format
5 years ago
Victor Julien ab1200fbd7 compiler: more strict compiler warnings
Set flags by default:

    -Wmissing-prototypes
    -Wmissing-declarations
    -Wstrict-prototypes
    -Wwrite-strings
    -Wcast-align
    -Wbad-function-cast
    -Wformat-security
    -Wno-format-nonliteral
    -Wmissing-format-attribute
    -funsigned-char

Fix minor compiler warnings for these new flags on gcc and clang.
8 years ago
Victor Julien 46e55f1e34 http body handling: use streaming buffer API
Convert HTTP body handling to use the Streaming Buffer API. This means
the HtpBodyChunks no longer maintain their own data segments, but
instead add their data to the StreamingBuffer instance in the HtpBody
structure.

In case the HtpBodyChunk needs to access it's data it can do so still
through the Streaming Buffer API.

Updates & simplifies the various users of the reassembled bodies:
multipart parsing and the detection engine.
9 years ago
Eric Leblond 74ffa2b264 lua: move function to common utils
LuaStateNeedProto function can be used for any protocol so let's
move it out of the http file.
11 years ago
Victor Julien a114787150 lua: move lua output code to generic lua file
So that other Lua scripts (detect) can also start using it.
11 years ago
Victor Julien e0d544fb86 lua: move output http funcs to generic util file
Move output Http functions to util-lua-http.c so that detect can use
it later.
11 years ago