From: Dean M. B. <mik...@gm...> - 2010-06-03 14:49:52
|
On Thu, Jun 3, 2010 at 10:42 PM, Nelson, Erik - 2 <eri...@ba...> wrote: > Fernando Pelliccioni wrote: > >> 1. Dependencies to OpenSSL. >> The "boost/network/protocol/http/impl/sync_connection_base.hpp" depends on >> "boost/network/protocol/http/impl/sync_connection_base.hpp" and the las >> depends on "boost/asio/ssl.hpp" > > I had this problem as well… I just commented out the stuff I didn’t need in > sync_connection_base. In my opinion a better fix is to factor > https_sync_connection out into a different header file that is only > #included if the user includes, for example, a hypothetical > protocol/https/client.hpp > Well, it's not that simple you know. The reason is that the URL to get/post/delete/put/head is a runtime value. We do some pretty clever static+runtime dispatch to determine whether to create an https connection object that knows how to establish https connections and handle the request/response appropriately. The reason I opt for a macro to disable it is because I personally think you ought to know what you're doing with an HTTP client library if you specifically opt out of using SSL. The manifestation of this is as a macro you define that says explicitly that you don't want HTTPS support -- and the runtime dispatcher will just throw an exception if you give it an HTTPS URI. > This was is very unsurprising… never use anything from protocol/https, and > you’ll never have a dependency on SSL. > I've already refactored the code locally so the HTTPS handling is already in a different file. The wiring though is surrounded by the macro as discussed above. Patience is a virtue -- expect a push from me in a bit, although expect things might be broken because I'm still working on the async HTTP stuff, so for the brave please feel free to pull as soon as I push and see if I really broke anything. ;) -- Dean Michael Berris deanberris.com |