@@ -728,7 +728,7 @@ class ThreadPool final : public TaskQueue {
728
728
}
729
729
730
730
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
731
- OPENSSL_thread_stop ();
731
+ OPENSSL_thread_stop ();
732
732
#endif
733
733
}
734
734
@@ -1824,9 +1824,9 @@ class SSLServer : public Server {
1824
1824
bool is_valid () const override ;
1825
1825
1826
1826
SSL_CTX *ssl_context () const ;
1827
-
1828
- void update_certs (X509 *cert, EVP_PKEY *private_key,
1829
- X509_STORE *client_ca_cert_store = nullptr );
1827
+
1828
+ void update_certs (X509 *cert, EVP_PKEY *private_key,
1829
+ X509_STORE *client_ca_cert_store = nullptr );
1830
1830
1831
1831
private:
1832
1832
bool process_and_close_socket (socket_t sock) override ;
@@ -2824,7 +2824,9 @@ inline bool mmap::open(const char *path) {
2824
2824
wpath += path[i];
2825
2825
}
2826
2826
2827
- #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) && (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
2827
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | \
2828
+ WINAPI_PARTITION_GAMES) && \
2829
+ (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
2828
2830
hFile_ = ::CreateFile2 (wpath.c_str (), GENERIC_READ, FILE_SHARE_READ,
2829
2831
OPEN_EXISTING, NULL );
2830
2832
#else
@@ -2834,7 +2836,8 @@ inline bool mmap::open(const char *path) {
2834
2836
2835
2837
if (hFile_ == INVALID_HANDLE_VALUE) { return false ; }
2836
2838
2837
- #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
2839
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | \
2840
+ WINAPI_PARTITION_GAMES)
2838
2841
LARGE_INTEGER size{};
2839
2842
if (!::GetFileSizeEx (hFile_, &size)) { return false ; }
2840
2843
size_ = static_cast <size_t >(size.QuadPart );
@@ -2846,21 +2849,22 @@ inline bool mmap::open(const char *path) {
2846
2849
size_ = (static_cast <size_t >(sizeHigh) << (sizeof (DWORD) * 8 )) | sizeLow;
2847
2850
#endif
2848
2851
2849
- #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) && (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
2852
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) && \
2853
+ (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
2850
2854
hMapping_ =
2851
2855
::CreateFileMappingFromApp (hFile_, NULL , PAGE_READONLY, size_, NULL );
2852
2856
#else
2853
- hMapping_ =
2854
- ::CreateFileMappingW (hFile_, NULL , PAGE_READONLY, size.HighPart,
2855
- size.LowPart, NULL );
2857
+ hMapping_ = ::CreateFileMappingW (hFile_, NULL , PAGE_READONLY, size.HighPart ,
2858
+ size.LowPart , NULL );
2856
2859
#endif
2857
2860
2858
2861
if (hMapping_ == NULL ) {
2859
2862
close ();
2860
2863
return false ;
2861
2864
}
2862
2865
2863
- #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) && (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
2866
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) && \
2867
+ (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
2864
2868
addr_ = ::MapViewOfFileFromApp (hMapping_, FILE_MAP_READ, 0 , 0 );
2865
2869
#else
2866
2870
addr_ = ::MapViewOfFile (hMapping_, FILE_MAP_READ, 0 , 0 , 0 );
@@ -8185,7 +8189,8 @@ inline Result ClientImpl::Patch(const std::string &path,
8185
8189
8186
8190
inline Result ClientImpl::Patch (const std::string &path,
8187
8191
const std::string &body,
8188
- const std::string &content_type, Progress progress) {
8192
+ const std::string &content_type,
8193
+ Progress progress) {
8189
8194
return Patch (path, Headers (), body, content_type, progress);
8190
8195
}
8191
8196
@@ -8784,17 +8789,17 @@ inline bool SSLServer::is_valid() const { return ctx_; }
8784
8789
8785
8790
inline SSL_CTX *SSLServer::ssl_context () const { return ctx_; }
8786
8791
8787
- inline void SSLServer::update_certs (X509 *cert, EVP_PKEY *private_key,
8788
- X509_STORE *client_ca_cert_store) {
8792
+ inline void SSLServer::update_certs (X509 *cert, EVP_PKEY *private_key,
8793
+ X509_STORE *client_ca_cert_store) {
8789
8794
8790
- std::lock_guard<std::mutex> guard (ctx_mutex_);
8795
+ std::lock_guard<std::mutex> guard (ctx_mutex_);
8791
8796
8792
- SSL_CTX_use_certificate (ctx_, cert);
8793
- SSL_CTX_use_PrivateKey (ctx_, private_key);
8797
+ SSL_CTX_use_certificate (ctx_, cert);
8798
+ SSL_CTX_use_PrivateKey (ctx_, private_key);
8794
8799
8795
- if (client_ca_cert_store != nullptr ) {
8796
- SSL_CTX_set_cert_store (ctx_, client_ca_cert_store);
8797
- }
8800
+ if (client_ca_cert_store != nullptr ) {
8801
+ SSL_CTX_set_cert_store (ctx_, client_ca_cert_store);
8802
+ }
8798
8803
}
8799
8804
8800
8805
inline bool SSLServer::process_and_close_socket (socket_t sock) {
@@ -9579,7 +9584,8 @@ inline Result Client::Patch(const std::string &path, const char *body,
9579
9584
}
9580
9585
inline Result Client::Patch (const std::string &path, const char *body,
9581
9586
size_t content_length,
9582
- const std::string &content_type, Progress progress) {
9587
+ const std::string &content_type,
9588
+ Progress progress) {
9583
9589
return cli_->Patch (path, body, content_length, content_type, progress);
9584
9590
}
9585
9591
inline Result Client::Patch (const std::string &path, const Headers &headers,
@@ -9589,15 +9595,18 @@ inline Result Client::Patch(const std::string &path, const Headers &headers,
9589
9595
}
9590
9596
inline Result Client::Patch (const std::string &path, const Headers &headers,
9591
9597
const char *body, size_t content_length,
9592
- const std::string &content_type, Progress progress) {
9593
- return cli_->Patch (path, headers, body, content_length, content_type, progress);
9598
+ const std::string &content_type,
9599
+ Progress progress) {
9600
+ return cli_->Patch (path, headers, body, content_length, content_type,
9601
+ progress);
9594
9602
}
9595
9603
inline Result Client::Patch (const std::string &path, const std::string &body,
9596
9604
const std::string &content_type) {
9597
9605
return cli_->Patch (path, body, content_type);
9598
9606
}
9599
9607
inline Result Client::Patch (const std::string &path, const std::string &body,
9600
- const std::string &content_type, Progress progress) {
9608
+ const std::string &content_type,
9609
+ Progress progress) {
9601
9610
return cli_->Patch (path, body, content_type, progress);
9602
9611
}
9603
9612
inline Result Client::Patch (const std::string &path, const Headers &headers,
@@ -9607,7 +9616,8 @@ inline Result Client::Patch(const std::string &path, const Headers &headers,
9607
9616
}
9608
9617
inline Result Client::Patch (const std::string &path, const Headers &headers,
9609
9618
const std::string &body,
9610
- const std::string &content_type, Progress progress) {
9619
+ const std::string &content_type,
9620
+ Progress progress) {
9611
9621
return cli_->Patch (path, headers, body, content_type, progress);
9612
9622
}
9613
9623
inline Result Client::Patch (const std::string &path, size_t content_length,
@@ -9646,7 +9656,8 @@ inline Result Client::Delete(const std::string &path, const char *body,
9646
9656
}
9647
9657
inline Result Client::Delete (const std::string &path, const char *body,
9648
9658
size_t content_length,
9649
- const std::string &content_type, Progress progress) {
9659
+ const std::string &content_type,
9660
+ Progress progress) {
9650
9661
return cli_->Delete (path, body, content_length, content_type, progress);
9651
9662
}
9652
9663
inline Result Client::Delete (const std::string &path, const Headers &headers,
@@ -9656,15 +9667,18 @@ inline Result Client::Delete(const std::string &path, const Headers &headers,
9656
9667
}
9657
9668
inline Result Client::Delete (const std::string &path, const Headers &headers,
9658
9669
const char *body, size_t content_length,
9659
- const std::string &content_type, Progress progress) {
9660
- return cli_->Delete (path, headers, body, content_length, content_type, progress);
9670
+ const std::string &content_type,
9671
+ Progress progress) {
9672
+ return cli_->Delete (path, headers, body, content_length, content_type,
9673
+ progress);
9661
9674
}
9662
9675
inline Result Client::Delete (const std::string &path, const std::string &body,
9663
9676
const std::string &content_type) {
9664
9677
return cli_->Delete (path, body, content_type);
9665
9678
}
9666
9679
inline Result Client::Delete (const std::string &path, const std::string &body,
9667
- const std::string &content_type, Progress progress) {
9680
+ const std::string &content_type,
9681
+ Progress progress) {
9668
9682
return cli_->Delete (path, body, content_type, progress);
9669
9683
}
9670
9684
inline Result Client::Delete (const std::string &path, const Headers &headers,
@@ -9674,7 +9688,8 @@ inline Result Client::Delete(const std::string &path, const Headers &headers,
9674
9688
}
9675
9689
inline Result Client::Delete (const std::string &path, const Headers &headers,
9676
9690
const std::string &body,
9677
- const std::string &content_type, Progress progress) {
9691
+ const std::string &content_type,
9692
+ Progress progress) {
9678
9693
return cli_->Delete (path, headers, body, content_type, progress);
9679
9694
}
9680
9695
inline Result Client::Options (const std::string &path) {
0 commit comments