我正在使用jNetPcap库从离线Pcap文件中提取数据包信息。当我使用Microsoft Interface在Wi-Fi网络上捕获数据包时,我可以使用所有字段提取Http标头。但是使用Intel Interface(即我在代理连接时),我无法获得完整的http标头,缺少某些字段,如RequestURl,Request Version,RequestMethod。这些字段可以在Wireshark文件中看到,但它们没有显示在我的程序输出中。请告诉我为什么会这样。
String req_url = http.fieldValue(Request.RequestUrl);
输出是:
Http: ******* Http offset=54 (0x36) length=463 protocol suite=TCP/IP
Http:
Http: HOST = google.com
Http: PROXY-CONNECTION = keep-alive
Http: USER-AGENT = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7
Http: ACCEPT = text/html,application/xhtml+xml,applic(etc..)
Http: REFERER = http://googleads.g.doubleclick.net/pagead/drt/s
Http: ACCEPT-ENCODING = gzip,deflate,sdch
Http: ACCEPT-LANGUAGE = en-US,en;q=0.8
Http: ACCEPT-CHARSET = ISO-8859-1,utf-8;q=0.7,*;q=0.3