To learn more about HTTP and protocols relating to it, the best and most authoritive source is the World Wide Web Consortium (W3C). You can view their HTTP information store online at www.w3.org/Protocols.
For more information on DNS a good book to read is the Dummies Guide to DNS by Blair Rampling et al - it is quite short, I agree, but covers pretty much everything you need to know unless you are really interested in the deepest, darkest parts of the system.
The complete IMAP specification is online at http://www.imap.org/papers/docs/rfc3501.html, and worth reading if you want to get a solid grip on IMAP operations.
If you want to take your Curl knowledge forward, consider Kevin Hanegan's book "A Practical Guide to Curl" - it is quite a slow read, but you will learn a lot from it despite it being relatively short.
Copyright ©2015 Paul Hudson. Follow me: @twostraws.