I would say roll. This is not too complicated.
Capturing an HTTP message sent from a browser to Wireshark and reverse engineering if necessary using spec as a guide. (Cm. Andreas Magnusson below is perhaps the more relevant specification.)
I would recommend this approach personally for studying the protocol, and not just for pure specifications. Its pretty hard to learn things only from the specification. I would rather study the different behaviors of well-known http clients and try to figure out how everything works using the specification as my guide.
Format and send data over the socket when you are comfortable with HTTP.
Also, if you are new to socket programming, see the Beej Socket Programming Guide .
source share