jodd-servlet/src/main/java/jodd/servlet/wrapper/BufferResponseWrapper.java
@Override
	public void setHeader(final String name, final String value) {
		String lowerName = name.toLowerCase();
		if (lowerName.equals(CONTENT_TYPE)) {
			setContentType(value);
		} else if (buffer == null || !lowerName.equals(CONTENT_LENGTH)) {
			super.setHeader(name, value);
		}
	}
@Override
	public void setHeader(final String name, final String value) {
		String lowerName = name.toLowerCase();
		if (lowerName.equals(CONTENT_TYPE)) {
			setContentType(value);
		} else if (buffer == null || !lowerName.equals(CONTENT_LENGTH)) {
			super.setHeader(name, value);
		}
	}
Prevents setting content-length if buffering enabled.