#6491 extract common parseAndFillForContent method
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
bd11d6f682
commit
73ab70d174
|
@ -90,14 +90,7 @@ public class HttpChannelOverHttp extends HttpChannel implements HttpParser.Reque
|
|||
LOG.debug("needContent has content immediately available: {}", _content);
|
||||
return true;
|
||||
}
|
||||
try
|
||||
{
|
||||
_httpConnection.parseAndFillForContent();
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
_content = new HttpInput.ErrorContent(x);
|
||||
}
|
||||
parseAndFillForContent();
|
||||
if (_content != null)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
|
@ -118,14 +111,7 @@ public class HttpChannelOverHttp extends HttpChannel implements HttpParser.Reque
|
|||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("produceContent has no content, parsing and filling");
|
||||
try
|
||||
{
|
||||
_httpConnection.parseAndFillForContent();
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
_content = new HttpInput.ErrorContent(x);
|
||||
}
|
||||
parseAndFillForContent();
|
||||
}
|
||||
HttpInput.Content result = _content;
|
||||
if (result != null && !result.isSpecial())
|
||||
|
@ -135,6 +121,18 @@ public class HttpChannelOverHttp extends HttpChannel implements HttpParser.Reque
|
|||
return result;
|
||||
}
|
||||
|
||||
private void parseAndFillForContent()
|
||||
{
|
||||
try
|
||||
{
|
||||
_httpConnection.parseAndFillForContent();
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
_content = new HttpInput.ErrorContent(x);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean failAllContent(Throwable failure)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue