We're updating the issue view to help you get more done. 

ProxyServlet fails to return when remote content-type check fails

Description

The third check for contentType of image has a serious bug, the current code is as follows:

if (!contentType.startsWith("image")){
response.setStatus(404);
log.info("httpProxyServlet returning response 404 after receiving element with contentType ="+contentType);
}

However, it should be:

if (!contentType.startsWith("image")){
response.setStatus(404);
log.info("httpProxyServlet returning response 404 after receiving element with contentType ="+contentType);
return;
}

Without the return any content is still retrieved and displayed.

Environment

None

Status

Assignee

Eric Dalquist

Reporter

Dustin Schultz

Labels

None

Estimated End Date

None

Audience

None

Fix versions

Affects versions

2.6.1
2.6.0 GA
3.0.0

Priority

Critical