Skip to content

Commit

Permalink
Merge pull request #19 from JadeMatrix/v0.8.2
Browse files Browse the repository at this point in the history
v0.8.2
  • Loading branch information
JadeMatrix authored Jan 30, 2018
2 parents cc8928b + 8f44051 commit f907962
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 34 deletions.
22 changes: 11 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
cmake_minimum_required( VERSION 3.6 )
CMAKE_MINIMUM_REQUIRED( VERSION 3.6 )

set( CMAKE_CXX_STANDARD 11 )
set( CMAKE_CXX_STANDARD_REQUIRED ON )
SET( CMAKE_CXX_STANDARD 11 )
SET( CMAKE_CXX_STANDARD_REQUIRED ON )

project(
PROJECT(
"SHOW examples"
CXX
)

include_directories(
INCLUDE_DIRECTORIES(
src
)


add_executable(
ADD_EXECUTABLE(
hello_world
../examples/hello_world.cpp
)
add_executable(
ADD_EXECUTABLE(
echo
../examples/echo.cpp
)
add_executable(
ADD_EXECUTABLE(
http_1_1
../examples/http_1_1.cpp
)
add_executable(
ADD_EXECUTABLE(
streaming_echo
../examples/streaming_echo.cpp
)
add_executable(
ADD_EXECUTABLE(
fileserve
../examples/fileserve.cpp
)
add_executable(
ADD_EXECUTABLE(
multiple_clients
../examples/multiple_clients.cpp
)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

[![stable version](https://img.shields.io/github/release/JadeMatrix/SHOW.svg?label=stable)](https://github.com/JadeMatrix/SHOW/releases/latest)
[![latest version](https://img.shields.io/github/release/JadeMatrix/SHOW/all.svg?label=latest)](https://github.com/JadeMatrix/SHOW/releases)
[![Documentation Status](https://readthedocs.org/projects/show-cpp/badge/?version=v0.8.1)](http://show-cpp.readthedocs.io/en/v0.8.1/?badge=v0.8.1)
[![Documentation Status](https://readthedocs.org/projects/show-cpp/badge/?version=v0.8.2)](http://show-cpp.readthedocs.io/en/v0.8.2/?badge=v0.8.2)

SHOW is an idiomatic library for standalone webserver applications written for modern C++. SHOW is simple in the same way the standard library is simple it doesn't make any design decisions for the programmer, instead offering a set of primitives for building an HTTP web application. Everything — when to serve, what requests to accept, even whether to send a response at all — is completely up to the programmer.
SHOW is an idiomatic library for standalone webserver applications written for modern C++. SHOW is simple in the same way the standard library is simple; it doesn't make any design decisions for the programmer, instead offering a set of primitives for building an HTTP web application. Everything — when to serve, what requests to accept, even whether to send a response at all — is completely up to the programmer.

SHOW assumes a modern approach to application hosting, and is intended to be run behind a full reverse proxy such as [NGINX](https://nginx.org/). As such, SHOW will not support HTTP/2 or TLS (HTTPS); instead, you should write your applications to serve local HTTP/1.0 and HTTP/1.1 requests.

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# The short X.Y version.
version = u'0.8'
# The full version, including alpha/beta/rc tags.
release = u'0.8.1'
release = u'0.8.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Simple Header-Only Webserver

SHOW is designed to be an idiomatic library for standalone webserver applications written for modern C++. SHOW is simple in the same way the standard library is simple — it doesn't make any design decisions for the programmer, instead giving them a set of primitives for building an HTTP web application.

Both HTTP/1.0 and HTTP/1.1 are supported. SHOW assumes a modern approach to application hosting, and is intended to be run behind a full reverse proxy such as [NGINX](https://nginx.org/). As such, SHOW will not support HTTP/2 or TLS (HTTPS). Instead, you should write your applications to serve local HTTP/1.0 and HTTP/1.1 requests.
Both HTTP/1.0 and HTTP/1.1 are supported. SHOW assumes a modern approach to application hosting, and is intended to be run behind a full reverse proxy such as `NGINX <https://nginx.org/>`_. As such, SHOW will not support HTTP/2 or TLS (HTTPS). Instead, you should write your applications to serve local HTTP/1.0 and HTTP/1.1 requests.

SHOW uses the [`zlib` license](LICENSE). C++11 support and a POSIX operating system are required.
SHOW uses the `zlib license <https://github.com/JadeMatrix/SHOW/blob/master/LICENSE>`_. C++11 support and a POSIX operating system are required.

.. toctree::
:maxdepth: 2
Expand Down
2 changes: 1 addition & 1 deletion examples/echo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void handle_POST_request( show::request& request )

int main( int argc, char* argv[] )
{
std::string host = "::"; // IPv6 loopback (0.0.0.0 in IPv4)
std::string host = "::"; // IPv6 'any IP' (0.0.0.0 in IPv4)
unsigned int port = 9090; // Some random higher port
int timeout = 10; // Connection timeout in seconds

Expand Down
2 changes: 1 addition & 1 deletion examples/fileserve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ int main( int argc, char* argv[] )
return -1;
}

std::string host = "::"; // IPv6 loopback (0.0.0.0 in IPv4)
std::string host = "::"; // IPv6 'any IP' (0.0.0.0 in IPv4)
unsigned int port = 9090; // Some random higher port
int timeout = 10; // Connection timeout in seconds
std::string message = "Hello World!";
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

int main( int argc, char* argv[] )
{
std::string host = "::"; // IPv6 loopback (0.0.0.0 in IPv4)
std::string host = "::"; // IPv6 'any IP' (0.0.0.0 in IPv4)
unsigned int port = 9090; // Some random higher port
int timeout = 10; // Connection timeout in seconds
std::string message = "Hello World!";
Expand Down
2 changes: 1 addition & 1 deletion examples/http_1_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void handle_connection( show::connection& connection )

int main( int argc, char* argv[] )
{
std::string host = "::"; // IPv6 loopback (0.0.0.0 in IPv4)
std::string host = "::"; // IPv6 'any IP' (0.0.0.0 in IPv4)
unsigned int port = 9090; // Some random higher port
int timeout = 10; // Connection timeout in seconds
std::string message = "Hello World!";
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple_clients.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void handle_connection( std::shared_ptr< show::connection > connection )

int main( int argc, char* argv[] )
{
std::string host = "::"; // IPv6 loopback (0.0.0.0 in IPv4)
std::string host = "::"; // IPv6 'any IP' (0.0.0.0 in IPv4)
unsigned int port = 9090; // Some random higher port
int timeout = 10; // Connection timeout in seconds
std::string message = "Hello World!";
Expand Down
2 changes: 1 addition & 1 deletion examples/streaming_echo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void handle_POST_request( show::request& request )

int main( int argc, char* argv[] )
{
std::string host = "::"; // IPv6 loopback (0.0.0.0 in IPv4)
std::string host = "::"; // IPv6 'any IP' (0.0.0.0 in IPv4)
unsigned int port = 9090; // Some random higher port
int timeout = 10; // Connection timeout in seconds
std::string message = "Hello World!";
Expand Down
20 changes: 10 additions & 10 deletions src/show.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ namespace show
static const std::string name = "SHOW";
static const int major = 0;
static const int minor = 8;
static const int revision = 1;
static const std::string string = "0.8.1";
static const int revision = 2;
static const std::string string = "0.8.2";
}


Expand Down Expand Up @@ -283,8 +283,8 @@ namespace show
virtual int_type underflow();
virtual int_type uflow();
virtual std::streamsize xsgetn(
char_type* s,
std::streamsize count
char_type*,
std::streamsize
);
virtual int_type pbackfail(
int_type c = std::char_traits< char >::eof()
Expand All @@ -295,10 +295,10 @@ namespace show
{
public:
response(
connection & c,
http_protocol protocol,
const response_code& code,
const headers_type & headers
connection &,
http_protocol ,
const response_code&,
const headers_type &
);
~response();

Expand All @@ -308,8 +308,8 @@ namespace show
connection& _connection;

virtual std::streamsize xsputn(
const char_type* s,
std::streamsize count
const char_type*,
std::streamsize
);
virtual int_type overflow(
int_type ch = std::char_traits< char >::eof()
Expand Down
5 changes: 3 additions & 2 deletions src/show/base64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ namespace show
);


class base64_decode_error : public exception {
using exception::exception;
class base64_decode_error : public std::runtime_error
{
using runtime_error::runtime_error;
};


Expand Down

0 comments on commit f907962

Please sign in to comment.