[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-2342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17883250#comment-17883250
 ] 

Cedric Tabin commented on HTTPCLIENT-2342:
------------------------------------------

Hello [~abernal],

Thanks for jumping in and test on your side. This will surely help.

We do not use `HttpClients.createDefault()`, instead we are using 
`HttpClientBuilder.create().build()`, maybe that can make the difference ?
I'll dig further on my side too and provide more details but for now, just by 
changing the httpclient version from 5.3.1 to 5.4 causes the Content-Type to 
disappear (but note that the other headers like Content-Location and 
Content-Length are still present).

[~ggregory] I'll see how to provide those logs :-)

> Regression: Content-Type header not returned anymore
> ----------------------------------------------------
>
>                 Key: HTTPCLIENT-2342
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2342
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (classic)
>    Affects Versions: 5.4-beta1
>            Reporter: Cedric Tabin
>            Priority: Major
>
> Hello,
> We just upgraded today to httpclient5 version 5.4. It seems that the header 
> `Content-Type` is not returned anymore by the API, even when listing all the 
> headers.
> {code:java}
> client.execute(httpRequest, r -> {
>     //does not print Content-Type header 
>     for(Header h : r.getHeaders()) {
>         System.out.println("## "+h.getName()+": "+h.getValue());
>     }
>     System.out.flush();
>     return null;
> });
> {code}
> We can ensure that the `Content-Type` header is well set by the server by 
> browsing to the same URL and inspecting the network.
> Our code didn't change and with the version 5.3.1, the Content-Type is 
> correctly received.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to