Julian Sedding created SLING-6250:
-------------------------------------
Summary: Importing packages with large headers fails
Key: SLING-6250
URL: https://issues.apache.org/jira/browse/SLING-6250
Project: Sling
Issue Type: Bug
Components: Distribution
Affects Versions: Content Distribution Core 0.1.18
Reporter: Julian Sedding
Assignee: Julian Sedding
When importing packages with large headers, e.g. packages containing many
paths, the following exception is thrown:
{noformat}
java.lang.RuntimeException: java.io.IOException: Resetting to invalid mark
at java.io.BufferedInputStream.reset(BufferedInputStream.java:448)
at
org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporter.importStream(LocalDistributionPackageImporter.java:122)
at
org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporterTest.importPackageWithLargeHeader(LocalDistributionPackageImporterTest.java:100)
{noformat}
This happens when the header is larger than the default buffer size of the
{{BufferedInputStream}} and thus its {{#mark()}} is lost and {{#reset()}}
cannot happen anymore.
I will investigate, whether we can stop relying on marked input streams. This
would be desirable, because we cannot know in advance how long the header is.
cc [~teofili]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)