[cpp-xmltooling] branch master updated: SSPCPP-715 Allow DynamicMetadata to be fetched compressed
Rod Widdowson
rdw at steadingsoftware.com
Wed Jan 24 11:56:01 EST 2018
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository cpp-xmltooling.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-xmltooling.git;a=commit;h=1503e29204dac3ddb451e5fa0f12b05aadfc036c
The following commit(s) were added to refs/heads/master by this push:
new 1503e29 SSPCPP-715 Allow DynamicMetadata to be fetched compressed
1503e29 is described below
commit 1503e29204dac3ddb451e5fa0f12b05aadfc036c
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Jan 24 16:54:04 2018 +0000
SSPCPP-715 Allow DynamicMetadata to be fetched compressed
https://issues.shibboleth.net/jira/browse/SSPCPP-715
Add a new setter to HTTPSOAPTransport (setAcceptEncoding) and
pass that down to Curl.
---
xmltooling/soap/HTTPSOAPTransport.h | 8 ++++++++
xmltooling/soap/impl/CURLSOAPTransport.cpp | 9 +++++++++
2 files changed, 17 insertions(+)
diff --git a/xmltooling/soap/HTTPSOAPTransport.h b/xmltooling/soap/HTTPSOAPTransport.h
index 810b32c..02b2e02 100644
--- a/xmltooling/soap/HTTPSOAPTransport.h
+++ b/xmltooling/soap/HTTPSOAPTransport.h
@@ -62,6 +62,14 @@ namespace xmltooling {
virtual bool setRequestHeader(const char* name, const char* value)=0;
/**
+ * Sets the Accept-Encoding header.
+ *
+ * @param value the encoding to accept and decode, or "" for all supported encodings
+ * @return true iff the encoding is successfully set
+ */
+ virtual bool setAcceptEncoding(const char* value)=0;
+
+ /**
* Controls redirect behavior.
*
* @param follow true iff Location-based redirects should be honored
diff --git a/xmltooling/soap/impl/CURLSOAPTransport.cpp b/xmltooling/soap/impl/CURLSOAPTransport.cpp
index 2554f20..ca2d674 100644
--- a/xmltooling/soap/impl/CURLSOAPTransport.cpp
+++ b/xmltooling/soap/impl/CURLSOAPTransport.cpp
@@ -118,6 +118,15 @@ namespace xmltooling {
return (curl_easy_setopt(m_handle,CURLOPT_TIMEOUT,timeout)==CURLE_OK);
}
+ bool setAcceptEncoding(const char *value)
+ {
+#ifdef HAVE_CURLOPT_ACCEPT_ENCODING
+ return (curl_easy_setopt(m_handle, CURLOPT_ACCEPT_ENCODING, value) == CURLE_OK);
+#else
+ return (curl_easy_setopt(m_handle, CURLOPT_ENCODING, value) == CURLE_OK);
+#endif
+ }
+
bool setAuth(transport_auth_t authType, const char* username=nullptr, const char* password=nullptr);
bool setVerifyHost(bool verify) {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list