Describe the bug
HTTP HEAD Responses are currently not parsed correctly.
As there is no body, the library raises an Error and it does not seem possible to ignore it for HEAD responses.
-> dpkt.dpkt.NeedData: short body (missing 10 bytes)
Expected behavior
Option to tell the Response that it is a head_response such that it does not raise an Exception (dpkt.http.Response(head_response, head_response=True)).
Additional context
This problem was already raised in the past: https://github.com/kbandla/dpkt/issues/77
But if I understand the code correctly, only status codes 1XX, 204, and 304 are handled correctly at the moment.
Describe the bug HTTP HEAD Responses are currently not parsed correctly. As there is no body, the library raises an Error and it does not seem possible to ignore it for HEAD responses.
To Reproduce Steps to reproduce the behavior:
->
dpkt.dpkt.NeedData: short body (missing 10 bytes)
Expected behavior Option to tell the Response that it is a head_response such that it does not raise an Exception (
dpkt.http.Response(head_response, head_response=True)
).Additional context This problem was already raised in the past: https://github.com/kbandla/dpkt/issues/77 But if I understand the code correctly, only status codes 1XX, 204, and 304 are handled correctly at the moment.