The existing error pages are very basic and don't allow for
multi-lingual support or for conformity with other pages in a web site.
The aim of the callback functionality is to allow custom error pages to
be supported for calls to evhttp_send_error() by both calling
applications and Libevent itself.
A backward-incompatible change has been made to the title of error pages
sent by evhttp_send_error(). The original version of the function used
the reason argument as part of the title. That might have unforeseen
side-effects if it contains HTML tags. Therefore the title has been
changed to always use the standard status text.
An example of the error callback can be found in this
[version](https://github.com/libevent/libevent/files/123607/http-server.zip)
of the 'http-server' sample. It will output error pages with very bright
backgrounds, the error code using a very large font size and the reason.
Closes: #323 (cherr-picked from PR)
After this patchset http-connect works with pproxy [1]:
$ pproxy -l http://:8000/ -vvv &
$ http-connect //127.1:8000 http://kernel.org:80/
[1]: https://pypi.org/project/pproxy/
* http-connect:
http-connect: do not check connection on GET cb
http-connect: set Host header (for CONNECT and GET) (like curl)
http-connect: cleanup and helpers
http: do not close connection for CONNECT
http: do not assume body for CONNECT
Fixes: #946
Use the following for openssl 1.1+:
- X509_getm_notBefore over X509_get_notBefore
- X509_getm_notAfter over X509_get_notAfter
- use OPENSSL_VERSION_NUMBER over SSLeay()
- add missing headers
Refs: openssl/openssl@0b7347effe
After update [1] of the Visual Studio 2019 image cmake unable to find
path to the c compiler [2]:
cmake : CMake Error at CMakeLists.txt:47 (project):
At line:1 char:1
+ cmake -G 'Visual Studio 16 2019' -A x64 ..
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (CMake Error at ...t:47 (project)::String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
The CMAKE_C_COMPILER:
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe
is not a full path to an existing compiler tool.
[1]: https://github.com/appveyor/ci/issues/3231https://www.appveyor.com/updates/2019/12/09/
[2]: https://ci.appveyor.com/project/libevent/libevent/builds/29431286/job/a68h7dn9rcride9g
Add support for posix mutex priority inheritance. This is important to
avoid priority inversion in systems running with threads with different
priorities.
Signed-off-by: Andre Azevedo <andre.azevedo@gmail.com>
yuangongji:
"Many warnings appear when building and running with Visual Studio 2019 in Appveyor:
WARN C:\projects\libevent\test\regress_ssl.c:210: Version mismatch for openssl: compiled with 1000214f but running with 1000212f
Simply add the openssl binary to the "PATH" environment variable to fix it.
I wrote a simple demo to reproduce it: https://github.com/ygj6/verify
I see there are dozens of openssl libraries in the system of appveyor: https://ci.appveyor.com/project/ygj6/verify/builds/28290688
If you do not specify which openssl to use, the system cannot find the correct library."
* upstream/pr/915:
appveyor: add vs2019 os to test some new features brought by Win10
test: add testcase for evutil_socketpair()
evutil: make evutil_socketpair() have the same behavior on Windows with build number lower and higher than 17063
Yes we still have flacky tests, but anyway two main configuration can
fail too (and they do fail from time to time) so let's not allow any
failures and see how this will go.
(Credits to @ygj6 via #910)
The CMAKE_C_FLAGS_DEBUG, CMAKE_C_FLAGS_RELEASE, CMAKE_C_FLAGS_MINSIZEREL
and CMAKE_C_FLAGS_RELWITHDEBINFO options are correctly and deliberately
toggled to use the libcmt (/MT) flag options in place of the usual
msvcrt (/MD) options, but this isn't necessarily desired by the user.
The default choice can be overriden with the EVENT__MSVC_STATIC_RUNTIME
cmake option.
However, the /MD flag that is the choice of CMake only enters into
play for the four types of builds above. If the user introduces another
CMAKE_BUILD_TYPE, the base CMAKE_C_FLAGS must not be manipulated, as
that value (and the CMAKE_C_FLAGS_{custom} value) have been explicitly
chosen by the user/developer deploying this library, and the mismatch
between these flags in different dependencies results in link errors.
The CMake build schema itself doesn't place an /MD flag in CMAKE_BUILD_TYPE
so any /M compile option in that variable needs to be retained.
Signed-off-by: William Rowe <wrowe@pivotal.io>
Signed-off-by: Yechiel Kalmenson <ykalmenson@pivotal.io>