HTTPSBridge.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (c) 2002-2009 Moxie Marlinspike
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 3 of the
  7. * License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  17. * USA
  18. */
  19. #ifndef __HTTPS_BRIDGE_H__
  20. #define __HTTPS_BRIDGE_H__
  21. #include "SSLBridge.hpp"
  22. #include "http/HttpHeaders.hpp"
  23. using namespace boost::asio;
  24. class HTTPSBridge : public SSLBridge {
  25. private:
  26. void buildRequestFromHeaders(HttpHeaders &headers, std::string &request);
  27. protected:
  28. HttpHeaders headers;
  29. virtual bool readFromClient();
  30. public:
  31. HTTPSBridge(boost::shared_ptr<ip::tcp::socket> clientSocket,
  32. ip::tcp::socket *serverSocket)
  33. : SSLBridge(clientSocket, serverSocket) {}
  34. };
  35. #endif