hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HTTPCLIENT-1740) Is there a way to change the Max Response Size via configuration property?
Date Fri, 06 May 2016 12:10:12 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oleg Kalnichevski resolved HTTPCLIENT-1740.
-------------------------------------------
    Resolution: Not A Problem

No, there is not. 

Please, in the future post your questions to the user list. 

Oleg

> Is there a way to change the Max Response Size via configuration property?
> --------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1740
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1740
>             Project: HttpComponents HttpClient
>          Issue Type: Wish
>          Components: HttpClient
>            Reporter: Tenji Shen
>              Labels: features
>
> I know that there is one way to achieve, get the data as InputStream and decide how many
bytes I want to read myself. Just like:
> in = method.getResponseBodyAsStream();
> out = new ByteArrayOutputStream(READ_BUFFER_SIZE);
> while ((len = in.read(buff)) != -1 && byteCount <= RESPONSE_SIZE_LIMIT) {
>     byteCount += len;
>     out.write(buff, 0, len);
> }
> if (byteCount >= RESPONSE_SIZE_LIMIT) {
>     throw new IOException(
>             "Size limited exceeded reading from HTTP input stream");
> }
> But I was wondering if there is a possible way to limit response size via configuration
property, thanks for answering.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message