|
Boost-Commit : |
From: lists.drrngrvy_at_[hidden]
Date: 2008-05-20 12:14:12
Author: drrngrvy
Date: 2008-05-20 12:14:12 EDT (Tue, 20 May 2008)
New Revision: 45582
URL: http://svn.boost.org/trac/boost/changeset/45582
Log:
Removing files properly...
Removed:
sandbox/SOC/2007/cgi/trunk/boost/cgi/buffer.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/cookie.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/header.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/return.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/streambuf.hpp
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/buffer.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/buffer.hpp 2008-05-20 12:14:12 EDT (Tue, 20 May 2008)
+++ (empty file)
@@ -1,26 +0,0 @@
-// -- buffer.hpp --
-//
-// Copyright (c) Darren Garvey 2007
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_BUFFER_HPP_INCLUDED__
-#define CGI_BUFFER_HPP_INCLUDED__
-
-#include <boost/asio/buffer.hpp>
-
-namespace cgi {
- namespace common {
-
- /// Import the Boost.Asio overloads.
- using boost::asio::buffer;
-
- } // namespace common
-
- using common::buffer;
-
-} // namespace cgi
-
-#endif // CGI_HPP_INCLUDED__
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/cookie.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/cookie.hpp 2008-05-20 12:14:12 EDT (Tue, 20 May 2008)
+++ (empty file)
@@ -1,148 +0,0 @@
-// -- cookie.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_COOKIE_HPP_INCLUDED__
-#define CGI_COOKIE_HPP_INCLUDED__
-
-#include <string>
-#include <boost/system/error_code.hpp>
-#include <boost/tokenizer.hpp>
-
-namespace cgi {
- namespace common {
-
- template<typename CharT> struct basic_cookie;
-
- // typedefs for common usage
- typedef basic_cookie<char> cookie;
- typedef basic_cookie<wchar_t> wcookie;
-
- /// A `basic_cookie<>` object that can be (out-) streamed
- /**
- * Either set the parameters in the constructor, or set them directly.
- * Note: If you want to set the parameters individually, remember that each
- * parameter must NOT have a trailing semi-colon!
- *
- * TODO
- * - Data should be URL-encoded, or maybe provide an overload for url_decode
- * that takes an HttpCookie?
- * - Add from_string() ?
- */
- template<typename CharT>
- struct basic_cookie
- {
- typedef CharT char_type;
- typedef typename std::basic_string<CharT> string_type;
-
- basic_cookie() {}
-
- /// Delete the cookie named `_name`.
- basic_cookie(const string_type& _name)
- : name(_name)
- , value()
- , expires("Fri, 05-Jun-1989 15:30:00 GMT")
- , path("/")
- , secure(false)
- , http_only(false)
- {
- }
-
- /// Create a cookie.
- basic_cookie(const string_type& _name, const string_type& _val
- , const string_type& _expires = ""
- , const string_type& _path = "/"
- , const string_type& _domain = ""
- , bool _secure = false
- , bool HttpOnly = false)
- : name(_name)
- , value(_val)
- , expires(_expires)
- , path(_path)
- , domain(_domain)
- , secure(_secure)
- , http_only(HttpOnly)
- {
- }
-
- string_type name;
- string_type value;
- string_type expires;
- string_type path;
- string_type domain;
- bool secure;
- bool http_only;
-
- /// Create a cookie from a const char*
- /**
- * Rules taken from: http://wp.netscape.com/newsref/std/cookie_spec.html
- *
- * Assumes:
- * - Parts of the cookie are delimited by '; '. ie. if there is no space,
- * or multiple spaces after the semi-colon, this function won't work...
- */
- /* Actually, I'm omitting these functions for now, just had a thought...
- static basic_cookie<string_type>
- from_string(const char* str, boost::system::error_code& ec)
- {
- typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
- boost::char_separator<char> sep(";=");
- tokenizer tokens(str, sep);
- for (tokenizer::iterator iter = tokens.begin();
- iter != tokens.end(); ++iter)
- {
-
- }
- return ck;
- }
-
- static basic_cookie<string_type> from_string(const char* str)
- {
- boost::system::error_code ec;
- cookie ck = from_string(ec);
- detail::throw_error(ec);
- return ck;
- }
-
- static basic_cookie<string_type> from_string(std::string& str)
- {
- return from_string(str.c_str());
- }
-
- static basic_cookie<string_type>
- from_string(std::string& str, boost::system::error_code& ec)
- {
- return from_string(str.c_str(), ec);
- }
- */
-
- /// Make a string out of the cookie
- string_type to_string()
- {
- string_type str(name + "=" + value);
- if (!expires.empty()) str += ("; expires=" + expires);
- if (!path.empty() ) str += ("; path=" + path);
- if (!domain.empty() ) str += ("; domain=" + domain);
- if ( secure ) str += "; secure";
- if ( http_only ) str += "; HttpOnly";
- return str;
- }
- };
-
- } // namespace common
-} // namespace cgi
-
-
-template<typename OutStream, typename T>
-inline OutStream& operator<< (OutStream& os, cgi::common::basic_cookie<T>& ck)
-{
- os<< ck.to_string();
- return os;
-}
-
-#endif // CGI_COOKIE_HPP_INCLUDED__
-
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/header.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/header.hpp 2008-05-20 12:14:12 EDT (Tue, 20 May 2008)
+++ (empty file)
@@ -1,115 +0,0 @@
-// -- header.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_HEADER_HPP_INCLUDED__
-#define CGI_HEADER_HPP_INCLUDED__
-
-#include <string>
-#include <boost/lexical_cast.hpp>
-
-namespace cgi {
- namespace common {
-
- template<typename CharT>
- struct basic_header
- {
- typedef CharT char_type;
- typedef typename std::basic_string<CharT> string_type;
-
- basic_header()
- : content()
- {
- }
-
- basic_header(const string_type& _content)
- : content(_content)
- {
- }
-
- basic_header(const string_type& name, const string_type& val)
- : content(name + ": " + val)
- {
- }
-
- /// Construct an header from a cookie.
- basic_header(const basic_cookie<char_type>& ck)
- : content("Set-cookie: " + ck.to_string())
- {
- }
-
- string_type content;
- };
-
-/*
- template<typename StringT>
- header<StringT>
- make_header(const StringT& name, const StringT& val)
- {
- return basic_header<StringT>(name, val);
- }* /
-
- template<typename T, typename StringT>
- T make_header(const StringT& name, const StringT& val)
- {
- return basic_header<StringT>(name, val);
- }*/
-
-
- //{ Some shortcuts, to cut down on typing errors.
- template<typename CharT, typename StringT> basic_header<CharT>
- content_type(StringT const& str)
- {
- return basic_header<CharT>("Content-type", str);
- }
-
- template<typename CharT> basic_header<CharT>
- content_type(const CharT* str)
- {
- return basic_header<CharT>("Content-type", str);
- }
-
- template<typename CharT> basic_header<CharT>
- content_encoding(std::basic_string<CharT> const& str)
- {
- return basic_header<CharT>("Content-encoding", str);
- }
-
- template<typename CharT, typename T> basic_header<CharT>
- content_length(const T& t)
- {
- return basic_header<CharT>("Content-length",
- boost::lexical_cast<std::basic_string<CharT> >(t));
- }
-
- template<typename CharT> basic_header<CharT>
- content_length(std::basic_string<CharT> const& str)
- {
- return basic_header<CharT>("Content-length", str);
- }
-
- template<typename CharT> basic_header<CharT>
- location(const CharT* url)
- {
- return basic_header<CharT>("Location", url);
- }
-
- template<typename CharT> basic_header<CharT>
- location(std::basic_string<CharT> const& url)
- {
- return basic_header<CharT>("Location", url);
- }
- //}
-
- // typedefs for typical usage
- typedef basic_header<char> header;
- typedef basic_header<wchar_t> wheader;
-
- } // namespace common
-} // namespace cgi
-
-#endif // CGI_HEADER_HPP_INCLUDED__
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/return.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/return.hpp 2008-05-20 12:14:12 EDT (Tue, 20 May 2008)
+++ (empty file)
@@ -1,54 +0,0 @@
-// -- return.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_RETURN_HPP_INCLUDED__
-#define CGI_RETURN_HPP_INCLUDED__
-
-#include "boost/cgi/response.hpp"
-#include "boost/cgi/basic_request.hpp"
-
-namespace cgi {
- namespace common {
-
- template<typename Response, typename Request>
- boost::system::error_code
- return_helper(Response& resp, Request& req, int program_status)
- {
- boost::system::error_code ec;
- resp.send(req.client(), ec);
- if (ec) return ec;
-
- req.close(resp.status(), program_status);
-
- return ec;
- }
-
- } // namespace common
-} // namespace cgi
-
-/// If an error occurs during the sending or closing then `status` will be
-// incremented by the value of this macro.
-#ifndef BOOST_CGI_RETURN_ERROR_INCREMENT
-# define BOOST_CGI_RETURN_ERROR_INCREMENT 100
-#endif
-
-#define BOOST_CGI_RETURN(resp, req, status) \
- if ( ::cgi::common::return_helper(resp, req, status)) \
- /** error **/ \
- return status + BOOST_CGI_RETURN_ERROR_INCREMENT; \
- return status;
-
-namespace cgi {
- namespace common {
-
-#define return_(resp, req, status) BOOST_CGI_RETURN(resp, req, status)
-
- } // namespace common
-} // namespace cgi
-
-#endif // CGI_RETURN_HPP_INCLUDED__
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/streambuf.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/streambuf.hpp 2008-05-20 12:14:12 EDT (Tue, 20 May 2008)
+++ (empty file)
@@ -1,25 +0,0 @@
-// -- streambuf.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_STREAMBUF_HPP_INCLUDED__
-#define CGI_STREAMBUF_HPP_INCLUDED__
-
-#include <boost/asio/streambuf.hpp>
-
-namespace cgi {
- namespace common {
-
- using boost::asio::streambuf;
-
- } // namespace common
-
- using common::streambuf;
-
-} // namespace cgi
-
-#endif // CGI_STREAMBUF_HPP_INCLUDED__
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk