Prevent the OperationView to display an error in case the response contains a whitespace only body with content type application/json

This commit is contained in:
Bjoern Rochel
2015-04-16 11:59:27 +02:00
parent f9fdb05fbe
commit 6a1707e3ba

View File

@@ -549,6 +549,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
url = response.request.url; url = response.request.url;
} }
var headers = response.headers; var headers = response.headers;
content = content.trim();
// if server is nice, and sends content-type back, we can use it // if server is nice, and sends content-type back, we can use it
var contentType = null; var contentType = null;