Skip to content

[JENKINS-76353] Request fails if response contains header Content-Encoding: none #336

Description

@jenkins-infra-bot

We recently updated the HTTP request plugin to version 1.24 and are seeing issues in one workflow where a vendor API returns the response header Content-Encoding: none.

This results in the plugin throwing the following exception:

org.apache.hc.core5.http.HttpException: Unsupported Content-Encoding: none
	at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:153)
	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
	at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
	at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:185)
Caused: org.apache.hc.client5.http.ClientProtocolException: Unsupported Content-Encoding: none
	at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:188)
	at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:87)
	at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:55)
	at org.apache.hc.client5.http.classic.HttpClient.executeOpen(HttpClient.java:183)
	at jenkins.plugins.http_request.util.HttpClientUtil.execute(HttpClientUtil.java:122)
	at jenkins.plugins.http_request.HttpRequestExecution.executeRequest(HttpRequestExecution.java:484)
	at jenkins.plugins.http_request.HttpRequestExecution.authAndRequest(HttpRequestExecution.java:385)
	at jenkins.plugins.http_request.HttpRequestExecution.call(HttpRequestExecution.java:293)

I'm guessing this was due to the migration to httpclient 5 in version 1.21.

The plugin appears to have gracefully handled (ignored) the API request in the previous version.

Is there a way to configure the plugin to ignore this type of response? Thank you! m


Originally reported by l3ender, imported from: Request fails if response contains header Content-Encoding: none
  • assignee: janario
  • status: Open
  • priority: Minor
  • component(s): http-request-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 3
  • imported: 20260702-081740
Raw content of original issue

We recently updated the HTTP request plugin to version 1.24 and are seeing issues in one workflow where a vendor API returns the response header Content-Encoding: none.

This results in the plugin throwing the following exception:

org.apache.hc.core5.http.HttpException: Unsupported Content-Encoding: none
	at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:153)
	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
	at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
	at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:185)
Caused: org.apache.hc.client5.http.ClientProtocolException: Unsupported Content-Encoding: none
	at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:188)
	at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:87)
	at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:55)
	at org.apache.hc.client5.http.classic.HttpClient.executeOpen(HttpClient.java:183)
	at jenkins.plugins.http_request.util.HttpClientUtil.execute(HttpClientUtil.java:122)
	at jenkins.plugins.http_request.HttpRequestExecution.executeRequest(HttpRequestExecution.java:484)
	at jenkins.plugins.http_request.HttpRequestExecution.authAndRequest(HttpRequestExecution.java:385)
	at jenkins.plugins.http_request.HttpRequestExecution.call(HttpRequestExecution.java:293)

I'm guessing this was due to the migration to httpclient 5 in version 1.21.

The plugin appears to have gracefully handled (ignored) the API request in the previous version.

Is there a way to configure the plugin to ignore this type of response? Thank you! m

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions