Граф коммитов

2260 Коммитов

Автор SHA1 Сообщение Дата
Billy O'Neal 74d3e8df5a
Don't initialize atomic_flag with 0. (#1093) 2019-03-28 15:25:56 -07:00
Billy O'Neal d4fb1cf7f7
Mint v2.10.12. (#1089) 2019-03-26 23:59:37 -07:00
Billy O'Neal 23901dcaad
Fix data race, GitHub #1085 (#1088)
* Fix data race, GitHub #1085

* Fix *nix typos.
2019-03-26 20:49:43 -07:00
Juan Eugenio Abadie 275b9c1bd2 Fix thread not joined (#1080)
* Add locks to guarantee asio io_service thread is joined

* Use lock_guard instead of unique_lock and add unlock comments.
2019-03-26 12:14:09 -07:00
Juan Eugenio Abadie 42a6e760f7 Workaround data-race on websocketpp's _htonll function (#1082)
* Workaround data-race on websocketpp's _htonll function

* Add URI to discussion.
2019-03-25 20:09:37 -07:00
Billy O'Neal 9b670e5b33
Fix oauth nonces containing nulls. (#1084) 2019-03-25 17:50:39 -07:00
Billy O'Neal f10d9f8e21
Rewrite date formatting and parsing (#1076)
This overhauls the RFC 1123 and ISO 8601 parsing with bits copied from the autorest C prototype, giving more consistent behavior across platforms, and removing unintended locale dependencies. (For example, before on POSIX on a German machine we might emit Die, 19 Mär 2019 09:59:57 which would be rejected by servers)

There is a subtle breaking change in that we previously accepted a time with no date, e.g. "12:12:12Z", and this change rejects that. However, such input is not a valid ISO 8601 input, and we were crazy about how we handled it before. Before, on Windows we would fill in the date with whatever the current date is, but on POSIX we would fill in January 1, 1970. Considering this was never consistent, and considering 99.999% of internet customers are going to be using RFC 3339 which requires all the components, I've dropped that special case.

Lots of tests also added.
2019-03-21 14:59:24 -07:00
Billy O'Neal a325079f7e
Mint v2.10.11. (#1074) 2019-03-20 02:31:50 -07:00
Billy O'Neal 11316786d3
Move get_jvm_env back into the crossplat namespace (#1073)
* Move get_jvm_env back into the crossplat namespace as it is declared in a header and used elsewhere.

* Add more missing crossplat:: qualifications.
2019-03-20 02:23:28 -07:00
Gareth Sylvester-Bradley ea4eff7cd1 Add the missing ssl::context callback in websocket_client_config (#1049)
* Add the missing ssl::context callback in websocket_client_config, borrowing heavily from http_client

* Add dependency on Boost and OpenSSL when websocketpp is used for Secure WebSocket, just like for http_client when CPPREST_HTTP_CLIENT_IMPL STREQUAL "asio"
2019-03-19 18:59:12 -07:00
Bryan Lipinski fac2ff7352 Gate stdext::checked_array_iterator usage on _ITERATOR_DEBUG_LEVEL (#1072) 2019-03-19 18:58:29 -07:00
Billy O'Neal 0387cb9d88
Merge pull request #1051 from garethsb-sony/garethsb-http-ssl_context_callback
Fix http_client_asio "https" with a proxy
2019-03-19 18:48:31 -07:00
Billy O'Neal (VC LIBS) 6225905eb4 Merge remote-tracking branch 'origin/master' into garethsb-http-ssl_context_callback 2019-03-19 16:56:11 -07:00
Billy O'Neal a917bd4ade
Add --vcpkg-root to repair UWP. (#1071) 2019-03-19 16:43:00 -07:00
Billy O'Neal (VC LIBS) 7d2b63c2be Merge remote-tracking branch 'origin/master' into fix_uwp 2019-03-19 15:55:26 -07:00
Billy O'Neal 355889b003
Update Boost_for_android for Android R19 (#1041)
This was forced on us by a change made in Azure Pipelines.

This change also builds Android with an updated copy of CMake; the version included with Ubuntu didn't have the Boost_ARCHITECTURE knob we need to change for the new -a32 and -x32 library suffixes.
2019-03-19 15:54:49 -07:00
Billy O'Neal (VC LIBS) b914ad90aa Add --vcpkg-root to repair UWP. 2019-03-19 15:39:53 -07:00
Mohamed Akram bf116c58c8 Enable testing from root directory (#1064) 2019-03-19 11:52:51 -07:00
Billy O'Neal 9d3b5cd4f5
Don't close the output stream when reporting errors reading the body. (#1068)
This matches the asio implementation to what the winhttp implementation was doing.

Also turned on a test that looked related; I'm not positive that this change fixed that test but it passes for me now.
2019-03-19 11:52:01 -07:00
EmmaZhu-MSFT 3f6f84461a Returns int64 value in function of seeking to file end on x64 Windows. (#1057) 2019-03-14 18:18:36 -07:00
Billy O'Neal 572ab7cf55
Update vcpkg. (#1053)
* Update vcpkg.

* Work around Azure Pipelines bug caused by global VCPKG_ROOT environment variable.

* Syntax error!
2019-03-06 14:39:34 -08:00
garethsb-sony 43773b9858 Add the obvious missing constructor from a std::error_code and 'what' string message; cf. websocket_exception 2019-03-05 08:59:54 +00:00
garethsb-sony bc77da3982 Fix upgrade to SSL after a proxy connect (hostname is required) 2019-02-27 17:36:59 +00:00
garethsb-sony 886855b08c Add exception handling for the ssl_context_callback so it has a means to report errors 2019-02-27 17:33:38 +00:00
Gareth Sylvester-Bradley f940d5510e Fix HTTP/1.0 'Keep-Alive' handling in http_client (#1032) 2019-02-11 14:41:08 -08:00
Billy O'Neal a2b9a0542b
Disable WINHTTP_AUTOPROXY_OPTIONS machinery when using WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY. (#1040) 2019-02-11 14:39:08 -08:00
Billy O'Neal 91f66c625b
Mint 2.10.10 to unblock Azure storage folks. (#1034) 2019-01-29 22:41:08 -08:00
Billy O'Neal 4ddaec3898
Temporary fix for VS2013. (#1033)
* Workaround some VS2013 bugs.

* Fix threadpool.cpp under VS2013.
2019-01-28 13:48:35 -08:00
Tim Oesterreich 5a885dd7c7 Handle multi-byte unicode characters in json parsing (#1023)
* handle multi-byte unicode characters in json parsing

* Properly check high surrogate start and end

Co-Authored-By: Tymolc <tim.oesterreich1@gmail.com>
2019-01-28 13:06:32 -08:00
Billy O'Neal 8f0393dd7b
Mint 2.10.9. (#1025) 2019-01-18 17:04:44 -08:00
Billy O'Neal c66f84d222
Resolve double free when WinHttpSendRequest fails (#1022)
* Update vcpkg.

* Resolve double free when WinHttpSendRequest fails

A customer reported that win WinHttpSendRequest fails, WinHTTP still
delivers WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING callbacks. When
_start_request_send encountered a failure, it deleted the context
weak_ptr, and then the WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
also tried to delete it, resulting in double frees.

This change binds the weak_ptr to the handle more directly and avoids paying attention to WinHttpSendRequest.
2019-01-18 16:56:24 -08:00
Fabrice Fontaine e6498b2f99 http_compression.cpp: fix build with gcc 4.7 (#1024)
At GCC 4.7, C++11 rules for noexcept specification of implicit
destructors (and default specification on explicit destructors without
exception specifications) aren't perfectly implemented, see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53613

Fixes:
 - http://autobuild.buildroot.org/results/a080dbe2977cd35e4f8351d864bd71aaa8f9b743

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-01-18 13:24:38 -08:00
mobileben 0f766a0683 #1015 Add in support for adding i386 slice when building for 32-bit targets. Also improve messaging and add means to clean (#1017) 2019-01-17 15:31:32 -08:00
Patrick Schmidt c5ebc28232 #1020 handle null bytes when parsing utf8 (#1021)
* add regression test for conversion of null byte

* handle null bytes like single byte characters
2019-01-16 12:16:51 -08:00
René Meusel be5d43f274 FIX: crash with std::logic_error when reusing a connection that timed out on the server (#1019)
* FIX: check whether instream() is valid before trying to rewind

* add .can_seek() as a second line of defense

* apply clang-format

* improve error reporting for unrewindable streams

* Add René Meusel (reneme) to CONTRIBUTORS.txt.
2019-01-16 12:12:22 -08:00
Arkady Shapkin 21a609bd76 gcc: Fix compilation with -fno-operator-names (#1009) 2019-01-09 12:36:31 -08:00
Billy O'Neal 57a7ff2c07
clang-format cpprestsdk (#1005) 2018-12-20 17:02:57 -08:00
mobileben 00f4843559 #993, #1002: Add flexibility for iOS building. Adds command line args… (#1004)
* #993, #1002: Add flexibility for iOS building. Adds command line args to configure.sh to allow more customization of iOS lib

* Add mobileben to CONTRIBUTORS.txt
2018-12-20 00:44:02 -08:00
Billy O'Neal 62af5c0a86
Add tests reported in Github issues. (#1001)
* Add tests reported in Github issues.

* Fix lying ampersand comment.

* Fix missing string escape.
2018-12-18 21:57:26 -08:00
Billy O'Neal 452afceb93
Update vcpkg dependencies. (#997) 2018-12-14 22:24:48 -08:00
Billy O'Neal 65267c6e83
Remove use of aligned_union that broke CentOS 7. (#987) 2018-12-06 23:57:00 -08:00
Trevor Lacey 744f33baec Prevent infinite loop during proxy authentication (#986) 2018-12-04 13:59:36 -08:00
Ernie Pistor 7368961107 Address gcc warnings-as-errors in compression code, test improvements (#973)
Thanks for your contribution!
2018-11-30 15:17:40 -08:00
Billy O'Neal 204a526102
Mint 2.10.8. (#970)
* Mint 2.10.8

* Lesssssssssss ssssssssssssss
2018-11-14 12:48:56 -08:00
Alexander Widerberg 7222fa2f2c Fixes iOS builds and makes it more future proof (#961)
* Fixed builds for iOS to be more future proof

* Added possibility to change OpenSSL version

* Add leetal to CONTRIBUTORS.txt
2018-11-12 14:31:35 -08:00
Ernie Pistor 0864365a6a Fix Brotli compress_helper early termination issue (#963) 2018-11-12 14:26:48 -08:00
Gianfranco Costamagna f3824aa8d0 cmake: add code to detect system brotli library (#952) 2018-11-12 12:10:45 -08:00
Daniel Griffing 19d2ebb6f6 Add uri_builder::append_path_raw(...) to allow adding elements to path intentionally beginning with '/' ("//" will results in the final path value) (#958)
* add append_path_raw() to uri_builder

* modify implementation details

* modified test case

* fixed append_path_raw and included a testscase for a trailing slash with that API

* update submodule to vcpkg master due to the NuGet hash changes

* Avoid double encoding through set_path and add tests. Extract single slash string comparison. Reduce string copy count. Add VS Code settings and launch.

* Optimize append_path similarly.

* Also optimize append_query.

* Also optimize other uri_builder things.

* Avoid self references.
2018-11-12 10:44:41 -08:00
Christian aabec3cbca Fix string size for error message generated by windows_category (#966)
Due to the initial allocation of the error message, the returned std::string had a size of 4096. Since FormatMessageW already returns the number of characters written to the buffer an additional call to resize using the returned count will neatly trim the string.
2018-11-10 16:35:07 -08:00
Billy O'Neal b0b2fc4a0a
Update vcpkg to latest master to fix VS2015 build. (#960)
* Update vcpkg to latest master to fix VS2013 build.

* Update again!
2018-11-10 15:26:52 -08:00