We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6eb81c commit 8bacbfbCopy full SHA for 8bacbfb
modules/swagger-codegen/src/main/resources/ruby/api_client.mustache
@@ -199,7 +199,7 @@ module {{moduleName}}
199
# @return [Tempfile] the file downloaded
200
def download_file(response)
201
content_disposition = response.headers['Content-Disposition']
202
- if content_disposition
+ if content_disposition and content_disposition =~ /filename=/i
203
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
204
prefix = sanitize_filename(filename)
205
else
0 commit comments