Add support of raw_body hooks#123
Add support of raw_body hooks#123socketpair wants to merge 4 commits intoOISF:0.5.xfrom socketpair:raw_body_hook
Conversation
|
Unfortunatelly I don't know how to add tests... |
There was a problem hiding this comment.
To maintain binary compatibility this should be added to the end of the structure.
There was a problem hiding this comment.
This is not user-accessible structure. Should I fix that? So, if user upgrades libhtp, binary compatibility issue should never happen. Does not it ?
There was a problem hiding this comment.
Even thought it's in a file named 'private' it actually exposed. At least Suricata uses it, and even though we never seem to access the structure directly, I am rather safe that sorry. When we bump to 0.6.x we can reshuffle it again. A similar case is here: 5b43aff#diff-9815a4e5141bd3d3914c1b5f9295fdecR337
|
You can take this commit as an example for adding tests b85cb3a |
There was a problem hiding this comment.
these printfs are not suited for complete code, but for intermediate debugging only.
Callbacks are not fired. What I'm doing wrong?
There was a problem hiding this comment.
Where in your patch are you invoking the new callbacks?
There was a problem hiding this comment.
nowhere. Due to changes in htp/htp_request.c and htp/htp_response.c it should be called automatically. does not it? I'm novice in libhtp, and make patch as copy-paste with headers_data callbacks. Maybe I forgot something ?
This simplifies writing of transparent HTTP-proxies with this library
There was a problem hiding this comment.
@inliniac sorry. I have fixed bugs in my tests. Now everything is fine.
Unfortunately, without the first lines of request and response.
|
Well, @inliniac, why not to merge ? |
|
I'm not interested in libhtp anymore |
For GitHub, add the following branch name formats: - OISF/libhtp#123 - OISF/libhtp#123
This simplifies writing of transparent HTTP-proxies with this library