src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/sampler/hc/LaxDeflateInputStream.java [43:87]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        super(wrapped);
        this.relax = relax;
    }

    /* (non-Javadoc)
     * @see org.apache.http.client.entity.DeflateInputStream#read(byte[], int, int)
     */
    @Override
    public int read(byte[] b, int off, int len) throws IOException {
        try {
            return super.read(b, off, len);
        } catch (final EOFException ex) {
            return handleRelaxMode(ex, relax);
        }
    }

    @Override
    public int read() throws IOException {
        try {
            return super.read();
        } catch (final EOFException ex) {
            return handleRelaxMode(ex, relax);
        }
    }

    @Override
    public int read(byte[] b) throws IOException {
        try {
            return super.read(b);
        } catch (final EOFException ex) {
            return handleRelaxMode(ex, relax);
        }
    }

    /**
     * @param ex EOFException
     * @param relaxMode relax mode enabled
     * @return -1 if relax
     * @throws EOFException
     */
    private static int handleRelaxMode(final EOFException ex, final boolean relaxMode) throws EOFException {
        if(relaxMode) {
            return -1;
        } else {
            throw ex;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/sampler/hc/LaxGZIPInputStream.java [42:86]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        super(wrapped);
        this.relax = relax;
    }

    /* (non-Javadoc)
     * @see org.apache.http.client.entity.DeflateInputStream#read(byte[], int, int)
     */
    @Override
    public int read(byte[] b, int off, int len) throws IOException {
        try {
            return super.read(b, off, len);
        } catch (final EOFException ex) {
            return handleRelaxMode(ex, relax);
        }
    }

    @Override
    public int read() throws IOException {
        try {
            return super.read();
        } catch (final EOFException ex) {
            return handleRelaxMode(ex, relax);
        }
    }

    @Override
    public int read(byte[] b) throws IOException {
        try {
            return super.read(b);
        } catch (final EOFException ex) {
            return handleRelaxMode(ex, relax);
        }
    }

    /**
     * @param ex EOFException
     * @param relaxMode relax mode enabled
     * @return -1 if relax
     * @throws EOFException
     */
    private static int handleRelaxMode(final EOFException ex, final boolean relaxMode) throws EOFException {
        if(relaxMode) {
            return -1;
        } else {
            throw ex;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



