Ask Your Question

Revision history [back]

How does one view/export the file data of an http.response that has a content type of Jpeg or GIF

Following a tutorial I found online to make LUA script to show http request and responses https://lua.readthedocs.io/en/latest/lab3.html#exercise-3 I was able to change the script a bit to include and show the http file data with

local http_response_data = Field.new("http.file_data") and to_string(http_response_data())

however once I run the script, the file data is only shown for some http responses that have the content type html/text and html/css but nothing for GIF and Jpeg, how would one get those raw binary or hexdump to show like it is on the TCP stream since http.file_data technically should have all the file data?