[TIMOB-17133] Try gzip if contentLength is unknown (-1)
Merge pull request #5789 from ayeung/timob-17133

[TIMOB-17133] Try gzip if contentLength is unknown (-1)