trim patch (https://github.com/alibaba/tengine/issues/368)