Skip to content

Commit

Permalink
Merge pull request swagger-api#1173 from BjRo/handle_whitespace_in_re…
Browse files Browse the repository at this point in the history
…sponse

Prevent the OperationView to display an error in case the response contains a whitespace only body with content type application/json
  • Loading branch information
fehguy committed May 8, 2015
2 parents cdd8082 + 569830b commit 17dca9e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/javascript/view/OperationView.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
url = response.request.url;
}
var headers = response.headers;
content = jQuery.trim(content);

// if server is nice, and sends content-type back, we can use it
var contentType = null;
Expand Down

0 comments on commit 17dca9e

Please sign in to comment.