Exception when we have response header "Transfer-Encoding" as "Chunked" from target server

Not applicable

Hi ,

Seeing the below exception from apigee when we there is a header name Transfer-Encoding as Chunked in the target response .

Do you know why APIGEE is not liking that header from the target server?

When i remove the header it is working fine.

Exception APIGEE is throwing :


{ "fault": { "faultstring": "chunked MUST be the last transfer-coding applied to the message-body", "detail": { "errorcode": "protocol.http.ChunkedShouldBeLast" } } }

Response Header I am adding to the backend:

public class GreetingController { @RequestMapping("details/datainrange/{startdate}/{enddate}") public String greeting(@PathVariable("startdate") String startdate, @PathVariable("enddate") String enddate, HttpServletResponse response) {

response.setHeader("Transfer-Encoding", "chunked");

return startdate+enddate; } }

0 2 724
2 REPLIES 2

Not applicable

Looks like this is an issue if we have Repeated Transfer-Encoding Headers in the reponse from target.

why would you have *Repeated* headers of that kind?

Are you saying this is a server-side bug, a bug in the backend implementation?