Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ lib boost_http_io
: http_io_sources
: requirements
<library>/boost//http_proto
<library>/boost//url
<include>../
<define>BOOST_HTTP_IO_SOURCE
: usage-requirements
Expand Down
4 changes: 2 additions & 2 deletions example/server/asio_params.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
#ifndef BOOST_HTTP_IO_EXAMPLE_SERVER_ASIO_PARAMS_HPP
#define BOOST_HTTP_IO_EXAMPLE_SERVER_ASIO_PARAMS_HPP

#include "http_params.hpp"
#include <boost/http_io/detail/config.hpp>
#include <boost/http_io/server/handler_params.hpp>

namespace boost {
namespace http_io {

struct asio_params : http_params
struct asio_params : handler_params
{
};

Expand Down
105 changes: 0 additions & 105 deletions example/server/asio_server.cpp

This file was deleted.

54 changes: 0 additions & 54 deletions example/server/asio_server.hpp

This file was deleted.

18 changes: 9 additions & 9 deletions example/server/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,11 @@ service_unavailable(
void
file_responder::
operator()(
http_params& params) const
handler_params& params) const
{
if(params.is_shutting_down)
return service_unavailable(
params.res, params.sr, params.req);
params.res, params.serializer, params.req);

#if 0
// Returns a server error response
Expand All @@ -327,7 +327,7 @@ operator()(
params.req.target()[0] != '/' ||
params.req.target().find("..") != core::string_view::npos)
return make_error_response(http_proto::status::bad_request,
params.req, params.res, params.sr);
params.req, params.res, params.serializer);

// Build the path to the requested file
std::string path;
Expand Down Expand Up @@ -355,31 +355,31 @@ operator()(
params.res.append(
http_proto::field::content_type, mt);

params.sr.start<http_proto::file_source>(
params.serializer.start<http_proto::file_source>(
params.res, std::move(f), size);
return;
}

if(ec == system::errc::no_such_file_or_directory)
return make_error_response(
http_proto::status::not_found,
params.req, params.res, params.sr);
params.req, params.res, params.serializer);

// ec.message()?
return make_error_response(
http_proto::status::internal_server_error,
params.req, params.res, params.sr);
params.req, params.res, params.serializer);
}

//------------------------------------------------

void
https_redirect_responder::
operator()(http_params& params) const
operator()(handler_params& params) const
{
if(params.is_shutting_down)
return service_unavailable(
params.res, params.sr, params.req);
params.res, params.serializer, params.req);

std::string body;
prepare_error(params.res, body,
Expand All @@ -388,7 +388,7 @@ operator()(http_params& params) const
u1.set_scheme_id(urls::scheme::https);
u1.set_host_address("localhost"); // VFALCO WTF IS THIS!
params.res.append(http_proto::field::location, u1.buffer());
params.sr.start(params.res,
params.serializer.start(params.res,
http_proto::string_body( std::move(body)));
}

Expand Down
8 changes: 4 additions & 4 deletions example/server/handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#ifndef BOOST_HTTP_IO_EXAMPLE_SERVER_HANDLER_HPP
#define BOOST_HTTP_IO_EXAMPLE_SERVER_HANDLER_HPP

#include "http_params.hpp"
#include <boost/http_io/detail/config.hpp>
#include <boost/http_io/server/handler_params.hpp>
#include <boost/http_io/server/router.hpp>
#include <boost/http_proto/request_base.hpp>
#include <boost/http_proto/response.hpp>
Expand All @@ -21,13 +21,13 @@
namespace boost {
namespace http_io {

using router_type = router<http_params>;
using router_type = router<handler_params>;

//------------------------------------------------

struct https_redirect_responder
{
void operator()(http_params&) const;
void operator()(handler_params&) const;
};

//------------------------------------------------
Expand All @@ -40,7 +40,7 @@ struct file_responder
{
}

void operator()(http_params&) const;
void operator()(handler_params&) const;

private:
std::string doc_root_;
Expand Down
32 changes: 0 additions & 32 deletions example/server/http_params.hpp

This file was deleted.

Loading
Loading