invernizzi / scapy-http

Support for HTTP in Scapy
Other
301 stars 77 forks source link

Additionnal Headers - No CR between first_line and additionnal headers #21

Open xlash opened 8 years ago

xlash commented 8 years ago

Hi,

while querying for the representation of the packet, my additionnal server headers starts on the first line, without a \r\n.

The bug resides on module _self_build method, where the parsing of the HTTPVersion is not done therefore Status-Line, when match, must trigger the separator \r\n, and not " ". Removing Status line from this line below, fixes it.

def _self_build(obj, field_pos_list=None): if f.name in ['Method', 'Path']: