Skip to content

Commit

Permalink
JENKINS-42303 - Updated httpclient. HTTPCLIENT-1726
Browse files Browse the repository at this point in the history
  • Loading branch information
janario committed Mar 18, 2017
1 parent 7cc0fdf commit 3ea28a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -92,7 +92,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.1</version>
<version>4.5.3</version>
</dependency>

<dependency>
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/jenkins/plugins/http_request/MimeType.java
@@ -1,14 +1,15 @@
package jenkins.plugins.http_request;

import hudson.util.ListBoxModel;
import org.apache.http.entity.ContentType;

import hudson.util.ListBoxModel;

/**
* @author James Chapman
*/
public enum MimeType {

NOT_SET(ContentType.create("")),
NOT_SET(null),
TEXT_HTML(ContentType.TEXT_HTML),
TEXT_PLAIN(ContentType.TEXT_PLAIN),
APPLICATION_FORM(ContentType.APPLICATION_FORM_URLENCODED),
Expand Down
Expand Up @@ -92,7 +92,7 @@ void okText(HttpServletResponse response, String body) throws IOException {
}

void body(HttpServletResponse response, int status, ContentType contentType, String body) throws IOException {
response.setContentType(contentType.toString());
response.setContentType(contentType != null ? contentType.toString() : "");
response.setStatus(status);
response.getWriter().append(body);
}
Expand Down

0 comments on commit 3ea28a4

Please sign in to comment.