When the response from a server does not have a content-length in its header, libiqxmlrpc panics.
The xml-rpc server of opensubtitles.org has this behavior: API documentation.
The response headers contain X-Uncompressed-Content-Length and X-Compressed-Content-Length.
example code:
#include <libiqxmlrpc/libiqxmlrpc.h>
#include <libiqxmlrpc/client.h>
#include <libiqxmlrpc/https_client.h>
#include <libiqxmlrpc/inet_addr.h>
int main() {
iqnet::ssl::ctx = iqnet::ssl::Ctx::client_only();
iqxmlrpc::Client<iqxmlrpc::Https_client_connection> client(iqnet::Inet_addr("api.opensubtitles.org", 443), "/xml-rpc");
iqxmlrpc::Param_list pl;
pl.push_back(""); // username
pl.push_back(""); // password
pl.push_back("en"); // language
pl.push_back("SubDownloader 2.0.18"); // useragent
iqxmlrpc::Response r = client.execute("LogIn", pl);
return 0;
}
When the response from a server does not have a
content-lengthin its header, libiqxmlrpc panics.The xml-rpc server of opensubtitles.org has this behavior: API documentation.
The response headers contain
X-Uncompressed-Content-LengthandX-Compressed-Content-Length.example code: