Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http: close file when http body limit is reached #1873

Closed
wants to merge 1 commit into from

Commits on Feb 24, 2016

  1. http: close file when http body limit is reached

    In some conditions, if stream.reassembly.depth is greater than
    request/response-body-limit size, the logging output is wrong
    if filestore keyword is used with http.
    
    For example, we get:
    {... "app_proto":"http","fileinfo":{"filename":"\/file.pdf","state":"CLOSED","stored":false,"size":1049292,"tx_id":0}}
    
    "state":"CLOSED","stored":false should be "state":"TRUNCATED","stored":true.
    
    This happens because the file state and file flags,
    which is the information that determine a correct output,
    are not set properly since a file is logged before and then closed (HTPFileClose).
    
    The logic of this patch is to close a file when we are above
    the limits, such that the proper state and flags can be set
    and the file will be logged correctly.
    Giuseppe Longo committed Feb 24, 2016
    Configuration menu
    Copy the full SHA
    3dbb25c View commit details
    Browse the repository at this point in the history