I am working on an HTTP Traffic Data dataset that consists of a full POST and GET request. As shown below. I wrote code in java that separated each of these requests and saved it as a string element in an array list. Now I am confused how to parse this raw HTTP request in java, is there any better method than manual parsing?
GET http://localhost:8080/tienda1/imagenes/3.gif/ HTTP/1.1 User-Agent: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.8 (like Gecko) Pragma: no-cache Cache-control: no-cache Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Encoding: x-gzip, x-deflate, gzip, deflate Accept-Charset: utf-8, utf-8;q=0.5, *;q=0.5 Accept-Language: en Host: localhost:8080 Cookie: JSESSIONID=FB018FFB06011CFABD60D8E8AD58CA21 Connection: close
source share