RequestInfoImpl.java 文件源码

java
阅读 31 收藏 0 点赞 0 评论 0

项目:riposte 作者:
/**
 * {@inheritDoc}
 */
@Override
public synchronized List<InterfaceHttpData> getMultipartParts() {
    if (!isMultipartRequest() || !isCompleteRequestWithAllChunks())
        return null;

    if (multipartData == null) {
        byte[] contentBytes = getRawContentBytes();
        HttpRequest fullHttpRequestForMultipartDecoder =
            (contentBytes == null)
            ? new DefaultFullHttpRequest(getProtocolVersion(), getMethod(), getUri())
            : new DefaultFullHttpRequest(getProtocolVersion(), getMethod(), getUri(),
                                         Unpooled.wrappedBuffer(contentBytes));

        fullHttpRequestForMultipartDecoder.headers().add(getHeaders());

        multipartData = new HttpPostMultipartRequestDecoder(
            new DefaultHttpDataFactory(false), fullHttpRequestForMultipartDecoder, getContentCharset()
        );
    }

    return multipartData.getBodyHttpDatas();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号