geosolutions-it / http-proxy

Lean and Mean HTTP Proxy written in Java
GNU General Public License v3.0
21 stars 31 forks source link

HTTPProxy "eats" some contents bytes, content-lenght won't match #14

Closed etj closed 12 years ago

etj commented 12 years ago

Not all of the input bytes are returned to the caller, so the content-lenght header will not match the real content. It may bring to:

Observed in a WMS getCapability on Comune-FI: the CR were filtered out.

Refs here: https://github.com/geosolutions-it/http-proxy/blob/master/src/main/java/it/geosolutions/httpproxy/HTTPProxy.java#L709

while ((read = inputStreamServerResponse.read()) > 0) { if (Utils.escapeHtmlFull(read) > 0) { outputStreamClientResponse.write(read); } }