Skip to content

Commit

Permalink
Merge pull request #671 from hanskr/AJP_chunked_fix
Browse files Browse the repository at this point in the history
Don't pass on the Transfer-Encoding header when streaming
  • Loading branch information
mattrjacobs committed Mar 25, 2015
2 parents 0bca780 + ede26ab commit 712fef3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import javax.servlet.http.HttpServletResponse;

import org.apache.http.Header;
import org.apache.http.HttpHeaders;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.HttpClient;
Expand Down Expand Up @@ -106,7 +107,9 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t

// set headers
for (Header header : httpResponse.getAllHeaders()) {
response.addHeader(header.getName(), header.getValue());
if (!HttpHeaders.TRANSFER_ENCODING.equals(header.getName())) {
response.addHeader(header.getName(), header.getValue());
}
}

// copy data from source to response
Expand Down

0 comments on commit 712fef3

Please sign in to comment.