Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#296 ClientConnectorSSLError and attachment filenames bugs fix #297

Merged
merged 2 commits into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api_client_generation/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ generate_files() {
rm __init__.py # we don't care about __init__.py files
cp *.py $project_root/symphony/bdk/gen/${name}_model

# update rest.py
cd $code_gen_dir/output/symphony/bdk/gen
cp rest.py $project_root/symphony/bdk/gen/rest.py

# remove downloaded files
cd $code_gen_dir
rm -r output
Expand All @@ -53,6 +57,7 @@ generate_files() {
then
rm $support_file_name
fi

}

generate_files agent ${api_spec_base_url}/agent/agent-api-public-deprecated.yaml
Expand Down
Binary file modified api_client_generation/openapi-generator-cli.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions symphony/bdk/gen/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None):
if maxsize is None:
maxsize = configuration.connection_pool_maxsize

ssl_context = ssl.create_default_context(purpose=ssl.Purpose.CLIENT_AUTH, cafile=configuration.ssl_ca_cert)
ssl_context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=configuration.ssl_ca_cert)
ssl_context.load_default_certs()
ssl_context.verify_mode = ssl.CERT_REQUIRED

Expand Down Expand Up @@ -140,7 +140,7 @@ async def request(self, method, url, query_params=None, headers=None,
# must del headers['Content-Type'], or the correct
# Content-Type which generated by aiohttp
del headers['Content-Type']
data = aiohttp.FormData()
data = aiohttp.FormData(quote_fields=False)
for param in post_params:
k, v = param
if isinstance(v, tuple) and len(v) == 3:
Expand Down