Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

Unzip repository adapter always returns zero length file #87

Open
seiferma opened this issue Oct 30, 2016 · 2 comments
Open

Unzip repository adapter always returns zero length file #87

seiferma opened this issue Oct 30, 2016 · 2 comments

Comments

@seiferma
Copy link

Hello,

I am using the unzip repository adapter to access zipped update sites uploaded with maven tycho. However, it always returns a zero length element when i use an URI like this: http://pdrone.host/unzip/maven/latest-SNAPSHOT/test-repo/groupid/artifactid/content.jar. When I extract the file manually and copy the contents into the document root of my webserver, the update site works.

Unfortunately, I cannot locate the cause of this issue. Could you tell me, how to gather the required logs? I played around with logback.xml but could not get any useful results.

Best regards

@ctron
Copy link
Contributor

ctron commented Nov 2, 2016

The easiest thing would be to create a channel and command (wget) for reproducing the issue. That would already help a lot!

@seiferma
Copy link
Author

seiferma commented Nov 2, 2016

You can try the following command:
wget https://mammutbaum36.fzi.de/unzip/maven/latest-SNAPSHOT/cooperate-dev/plantuml.eclipse/plantuml.eclipse.updatesite/content.jar

If you try to download the full zip file, the operation succeeds:
wget https://mammutbaum36.fzi.de/maven/cooperate-dev/plantuml/eclipse/plantuml.eclipse.updatesite/1.0.0-SNAPSHOT/plantuml.eclipse.updatesite-1.0.0-20161101.205230-1.zip
wget https://mammutbaum36.fzi.de/unzip/maven/latest-SNAPSHOT/cooperate-dev/plantuml.eclipse/plantuml.eclipse.updatesite

The version we are running is 0.14.0.20160608-1431 (Build ID 20160908-1257).

I am worried that this is not enough information for you to find the cause of the issue. Please just reply with some instructions to gather more information you need.

mschreiber pushed a commit to mschreiber/packagedrone that referenced this issue Nov 15, 2016
… greater than 0

According to the ZipEntry.getSize() java-doc, the returned size might be
-1 if not known. The "Content-Length" in the HTTP response is not
mandatory, so this change only sets the http response content length if
the zip entry size is greater than 0. 

Change-Id: Ibe920651bb91a9167faa7a1072f2ff05785fc679
Signed-off-by: Martin Schreiber <m.schreiber@bachmann.info>
ctron pushed a commit that referenced this issue Nov 15, 2016
According to the ZipEntry.getSize() java-doc, the returned size might be
-1 if not known. The "Content-Length" in the HTTP response is not
mandatory, so this change only sets the http response content length if
the zip entry size is greater than 0. 

Change-Id: Ibe920651bb91a9167faa7a1072f2ff05785fc679
Signed-off-by: Martin Schreiber <m.schreiber@bachmann.info>
mschreiber pushed a commit to mschreiber/packagedrone that referenced this issue Nov 18, 2016
_Adding the RPM 'release' tag to the RPM metadata
_Adding a test plugin with one test class that tests the RpmExtractor by
calling the extract method and checking the metadata added.

Signed-off-by: Martin Schreiber <m.schreiber@bachmann.info>
ctron pushed a commit that referenced this issue Apr 6, 2017
According to the ZipEntry.getSize() java-doc, the returned size might be
-1 if not known. The "Content-Length" in the HTTP response is not
mandatory, so this change only sets the http response content length if
the zip entry size is greater than 0.

Change-Id: Ibe920651bb91a9167faa7a1072f2ff05785fc679
Signed-off-by: Martin Schreiber <m.schreiber@bachmann.info>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants