lib/smartsheet/api/header_builder.rb in smartsheet-1.1.0 vs lib/smartsheet/api/header_builder.rb in smartsheet-1.2.0

- old
+ new

@@ -67,11 +67,16 @@ end end def content_disposition if endpoint_spec.sending_file? - {'Content-Disposition': "attachment; filename=\"#{CGI::escape(request_spec.filename)}\""} + filename_suffix = + if request_spec.filename.nil? + then '' + else "; filename=\"#{CGI::escape(request_spec.filename)}\"" + end + {'Content-Disposition': "attachment#{filename_suffix}"} else {} end end @@ -86,6 +91,6 @@ def request_headers request_spec.header_overrides end end end -end \ No newline at end of file +end