@@ -20867,7 +20867,9 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
2086720867 } else {
2086820868
2086920869 // Default validator
20870- this.model.validatorUrl = window.location.protocol + '//online.swagger.io/validator';
20870+ if(window.location.protocol.startsWith('http')) {
20871+ this.model.validatorUrl = window.location.protocol + '//online.swagger.io/validator';
20872+ }
2087120873 }
2087220874 }
2087320875 },
@@ -21252,7 +21254,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
2125221254 if (isFileUpload) {
2125321255 return this.handleFileUpload(map, form);
2125421256 } else {
21255- return this.model['do'] (map, opts , this.showCompleteStatus, this.showErrorStatus, this);
21257+ return this.model.execute (map, this.options.swaggerOptions || {} , this.showCompleteStatus, this.showErrorStatus, this);
2125621258 }
2125721259 }
2125821260 },
@@ -21547,10 +21549,10 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
2154721549 pre = $('<audio controls>').append($('<source>').attr('src', url).attr('type', contentType));
2154821550
2154921551 // Download
21550- } else if (headers['Content-Disposition'].test(/attachment/) ||
21551- headers['content-disposition'].test(/attachment/) ||
21552- headers['Content-Description'].test(/File Transfer/) ||
21553- headers['content-description'].test(/File Transfer/)) {
21552+ } else if (( headers['Content-Disposition'] && headers['Content-Disposition'] .test(/attachment/) ) ||
21553+ ( headers['content-disposition'] && headers['content-disposition'] .test(/attachment/) ) ||
21554+ ( headers['Content-Description'] && headers['Content-Description'] .test(/File Transfer/) ) ||
21555+ ( headers['content-description'] && headers['content-description'] .test(/File Transfer/) )) {
2155421556
2155521557 if ('Blob' in window) {
2155621558 var type = contentType || 'text/html';
0 commit comments