Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/1.2.15'
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFrench committed Dec 6, 2017
2 parents 899235d + 564d694 commit 0f246e3
Show file tree
Hide file tree
Showing 19 changed files with 902 additions and 147 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ compiler:
- clang

sudo: required
iinstall:
before_install:
- sudo apt-get update -qq
- sudo apt-get install libevent-dev
- sudo apt-get install libevent-dev libonig-dev
script:
- cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && cmake --build .
- cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make examples

notifications:
- irc "irc.oftc.net#libevhtp"
36 changes: 17 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,19 @@ if (EVHTP_THR_SHARED_PIPE)
add_definitions(-DEVTHR_SHARED_PIPE)
endif()

CHECK_include_FILES(strings.h HAVE_STRINGS_H)
CHECK_include_FILES(string.h HAVE_STRING_H)
CHECK_include_FILES(stdlib.h HAVE_STDLIB_H)
CHECK_include_FILES(sys/time.h HAVE_SYS_TIME_H)
CHECK_include_FILES(sys/times.h HAVE_SYS_TIMES_H)
CHECK_include_FILES(unistd.h HAVE_UNISTD_H)
CHECK_include_FILES(stdarg.h HAVE_STDARG_PROTOTYPES)
CHECK_include_FILES(sys/tree.h HAVE_SYS_TREE)
CHECK_include_FILES(sys/queue.h HAVE_SYS_QUEUE)
CHECK_include_FILES(sys/un.h HAVE_SYS_UN)
check_include_files (stdlib.h HAVE_STDLIB_H)
check_include_files (string.h HAVE_STRING_H)
check_include_files (stdint.h HAVE_STDINT_H)
check_include_files (errno.h HAVE_ERRNO_H)
check_include_files (strings.h HAVE_STRINGS_H)
check_include_files (inttypes.h HAVE_INTTYPES_H)
check_include_files (limits.h HAVE_LIMITS_H)

check_include_files (unistd.h HAVE_UNISTD_H)
check_include_files (stdarg.h HAVE_STDARG_PROTOTYPES)
check_include_files (sys/tree.h HAVE_SYS_TREE)
check_include_files (sys/queue.h HAVE_SYS_QUEUE)
check_include_files (sys/un.h HAVE_SYS_UN)

CHECK_TYPE_SIZE("int" SIZEOF_INT)
CHECK_TYPE_SIZE("long" SIZEOF_LONG)
Expand Down Expand Up @@ -189,11 +192,11 @@ if (NOT EVHTP_DISABLE_EVTHR)
list (APPEND LIBEVHTP_EXTERNAL_LIBS pthread)
endif()

add_library(evhtp ${EVHTP_LIBTYPE} ${LIBEVHTP_SOURCE_FILES})
target_link_libraries(evhtp ${LIBEVHTP_EXTERNAL_LIBS})
add_library (evhtp ${EVHTP_LIBTYPE} ${LIBEVHTP_SOURCE_FILES})
target_link_libraries (evhtp ${LIBEVHTP_EXTERNAL_LIBS})

if (EVHTP_BUILD_SHARED)
set_target_properties(evhtp PROPERTIES SOVERSION "${PROJECT_VERSION}")
set_target_properties(evhtp PROPERTIES VERSION "${PROJECT_VERSION}" 0 OUTPUT_NAME "evhtp")
endif()

add_subdirectory(examples)
Expand All @@ -212,6 +215,7 @@ install (
FILES
${PROJECT_SOURCE_DIR}/include/evhtp/evhtp.h
${PROJECT_SOURCE_DIR}/include/evhtp/parser.h
${PROJECT_BINARY_DIR}/include/evhtp/config.h
DESTINATION
${INCLUDE_INSTALL_DIR}/evhtp)

Expand All @@ -221,12 +225,6 @@ install (
DESTINATION
${INCLUDE_INSTALL_DIR})

install (
FILES
${CMAKE_CURRENT_BINARY_DIR}/include/evhtp/config.h
DESTINATION
${INCLUDE_INSTALL_DIR}/evhtp)

if (NOT EVHTP_DISABLE_EVTHR)
install (
FILES
Expand Down
13 changes: 13 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
v1.2.15
o deprecated unset_hook and set_hook / cleanup (f1d2bd1 Nathan French)
o updated travis configuration (45003e1 Nathan French)
o Latest revision to support multiple SSL versions (4e353ba Tony Lambiris)
o remove silly comment (d3da401 Nathan French)
o check for errors in SSL RAND_(poll|bytes) calls (018dec8 Nathan French)
o Added new virtualhost examples and functions (3467382 Nathan French)
o added example request pausing app (282a1c9 Nathan French)
o Added a more extensive SSL sandbox. (1e0c241 Nathan French)
o Add examples/https/README (6ecf7e7 Nathan French)
o exit failure in example_https when SSL is disabled (0848e08 Nathan French)
o [#26] Use SSL_CTX_use_certificate_chain_file (4c4eb3a Nathan French)

v1.2.14 - !!!! SECURITY UPDATE !!!!
o Added doxygen tags. Updated Doxyfile to include more sources and headers. (50ab41d Dan Henderson)
o SSL logging on handshake errors (0fff6bc Nathan French)
Expand Down
15 changes: 8 additions & 7 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
| ![LOGO](http://i.imgur.com/uBd4iIz.png) | <h1>Libevhtp</h1> |
| :------------- | -------------: |

[![Build Status](https://travis-ci.org/ellzey/libevhtp.svg?branch=develop)](https://travis-ci.org/ellzey/libevhtp)
[![Build Status](https://travis-ci.org/criticalstack/libevhtp.svg?branch=develop)](https://travis-ci.org/criticalstack/libevhtp)
<a href="https://scan.coverity.com/projects/ellzey-libevhtp">
<img alt="Coverity Scan Build Status"
src="https://scan.coverity.com/projects/5084/badge.svg"/>
Expand All @@ -17,6 +17,7 @@ probably not very awesome, it's best to look at test.c to see advanced usage.
## Optional Dependencies
* [OpenSSL](http://openssl.org)
* pthreads
* [onig (regex)](https://github.com/kkos/oniguruma)

## Building
* cd build
Expand Down Expand Up @@ -51,7 +52,7 @@ Libevhtp attempts to address these problems along with a wide variety of cool me
1. Create a parent evhtp_t structure.
2. Assign callbacks to the parent for specific URIs or posix-regex based URI's
3. Optionally assign per-connection hooks (see hooks) to the callbacks.
4. Optionally assign pre-accept and post-accept callbacks for incoming connections.
4. Optionally assign pre-accept and post-accept callbacks for incoming connections.
5. Optionally enable built-in threadpool for connection handling (lock-free, and non-blocking).
6. Optionally morph your server to HTTPS.
7. Start the evhtp listener.
Expand All @@ -78,7 +79,7 @@ Libevhtp attempts to address these problems along with a wide variety of cool me
main(int argc, char ** argv) {
evbase_t * evbase = event_base_new();
evhtp_t * htp = evhtp_new(evbase, NULL);

evhtp_set_cb(htp, "/test", testcb, NULL);
evhtp_bind_socket(htp, "0.0.0.0", 8080, 1024);
event_base_loop(evbase, 0);
Expand All @@ -89,12 +90,12 @@ Libevhtp attempts to address these problems along with a wide variety of cool me
## Is evhtp thread-safe?

For simple usage with evhtp_use_threads(), yes. But for more extreme cases:
sorta, you are bound to the thread mechanisms of libevent itself.
sorta, you are bound to the thread mechanisms of libevent itself.

But with proper design around libevhtp, thread issues can be out-of-sight,
out-of-mind.
out-of-mind.

What do you mean by this "proper design" statement?
What do you mean by this "proper design" statement?

Refer to the code in ./examples/thread_design.c. The comments go into great detail
of the hows and whys for proper design using libevhtp's threading model.
Expand All @@ -113,7 +114,7 @@ with redis.

## Performance stuff

While we never documented any benchmark publically,
While we never documented any benchmark publically,
the popular open source project [ZIMG](http://zimg.buaa.us) did a bit of that
for us.The ZIMG team decided to move away from NGINX to libevhtp for their
software, and the results were pretty outstanding. Here is a graph showing their
Expand Down
2 changes: 1 addition & 1 deletion cmake/version.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set (PROJECT_MAJOR_VERSION 1)
set (PROJECT_MINOR_VERSION 2)
set (PROJECT_PATCH_VERSION 14)
set (PROJECT_PATCH_VERSION 15)
set (PROJECT_VERSION
"${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}")
Loading

0 comments on commit 0f246e3

Please sign in to comment.