From: Michael D. <mi...@mi...> - 2008-03-23 01:24:01
|
I just committed a few new files into the http_integration branch. These include code merged over from pion's HTTPTypes and HTTPParser classes. These are not functional yet by any means (I haven't even tried compiling them), but the process helped me come up with an initial set of questions: 1) Why does the http::request class not derive from basic_message? I noticed that http::response, OTOH does 2) I'm new to the art of making a "header only" library and am not familiar with the techniques and best practices required for this yet. This became an issue for me in converting over the "types" code. What is the best way to define static constant variables that will never change (strings, numbers, etc.)? How do I avoid "duplicate symbol" errors in my compiler? 3) A bug we recently fixed in Pion was with handling of HTTP header data. I see that that message using a multimap of strings and performs case-sensitive comparisons. I believe that headers need to be stored in a case-insensitive manner (please see my types::headers typedef in the new types.hpp file). I'm not so sure that this is the case for other protocols though. Should I disregard the "headers" container in message and just use a different one for the http classes? 4) I have a few other container types to add to the http message implementations, namely for query string and cookie parameters (see the "query_params" and "cookie_params" typedefs in types.hpp). What would be the best approach to incorporate these into http::request? 5) In general, what is the best way to add additional member (like status code, for example) variables to the http::request and http::response classes? It doesn't look like they were intended to be extended, but maybe that is b/c the implementation is just missing... Thanks, -Mike |