Skip to content

Commit

Permalink
Improve the solution for #382
Browse files Browse the repository at this point in the history
  • Loading branch information
decebals committed Sep 19, 2017
1 parent d4230ea commit c318aaa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pippo-core/src/main/java/ro/pippo/core/Response.java
Original file line number Diff line number Diff line change
Expand Up @@ -718,9 +718,9 @@ public Response contentLength(long length) {
* @return the content type
*/
public String getContentType() {
String contentType = httpServletResponse.getContentType();
String contentType = getHeader(HttpConstants.Header.CONTENT_TYPE);
if (contentType == null) {
contentType = getHeader(HttpConstants.Header.CONTENT_TYPE);
contentType = httpServletResponse.getContentType();
}

return contentType;
Expand All @@ -735,8 +735,8 @@ public String getContentType() {
public Response contentType(String contentType) {
checkCommitted();

httpServletResponse.setContentType(contentType);
header(HttpConstants.Header.CONTENT_TYPE, contentType);
httpServletResponse.setContentType(contentType);

return this;
}
Expand Down

0 comments on commit c318aaa

Please sign in to comment.