Rather than reassemble the streams youself, you can use tcptrace to reassemble the pcap file. I believe -e will do it.
Once you have the application-layer data in one piece, you can apply simple HTTP header parsing.... Perhps from a library such as http://github.com/ry/http-parser