remake chunk decoder. support HTTP status 308