Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

NGServer or ng client changes path delimiters on output #156

Open
angwe opened this issue Nov 7, 2018 · 2 comments
Open

NGServer or ng client changes path delimiters on output #156

angwe opened this issue Nov 7, 2018 · 2 comments

Comments

@angwe
Copy link

angwe commented Nov 7, 2018

When I run the epubcheck tool as a jar file through the java -jar command on an epub, the output for individual file errors inside the epub shows real path-delimited (slash, "/") output (epubs are just zip-packaged document structures) as /path/to/file.epub/path/inside/container/file.xhml, but when the jar file and accompanying libraries are loaded and launched in a nailgun server, the output from the ng replaces path-delimiters with dots as .path.to.file.epub.path.inside.container.file.xhml.
I can't figure out why this is happening (I see nothing obvious in the communication or output wrappers), and would prefer to be able to turn this off. Our users are not always sophisticated enough to be able to notice which of those dots are dots and which should be slashes.
It's also not universal to the output. If the error message that epubcheck returns has slashes in it (a DOCTYPE is wrong, for example), they remain in the output. Only the file/path related output gets changed.

Example:

[rd@biblio-dev5 ~]$ java -jar epubcheck.jar /path/to/9780472026715_EPUB.epub
Validating using EPUB version 2.0.1 rules.
ERROR(PKG-007): /path/to/9780472026715_EPUB.epub/mimetype(-1,-1): Mimetype file should only contain the string 'application/epub+zip' and should not be compressed.
ERROR(HTM-001): /path/to/9780472026715_EPUB.epub/OPS/package.opf(2,96): Any publication resource that is an XML-based media type must be a valid XML 1.0 document. XML version found: 1.1.

...

NGServer started in systemd with:
/usr/bin/java -cp /path/to/nailgun-server-1.0.0-SNAPSHOT.jar:/path/to/epubcheck-4.0.2/epubcheck.jar:/path/to/epubcheck-4.0.2/lib/* com.facebook.nailgun.NGServer 127.0.0.1


[rd@biblio-dev5 ~]$ ng com.adobe.epubcheck.tool.Checker /path/to/9780472026715_EPUB.epub
Validating using EPUB version 2.0.1 rules.
ERROR(PKG-007): .path.to.9780472026715_EPUB.epub.mimetype(-1,-1): Mimetype file should only contain the string 'application/epub+zip' and should not be compressed.
ERROR(HTM-001): .path.to.9780472026715_EPUB.epub.OPS.package.opf(2,96): Any publication resource that is an XML-based media type must be a valid XML 1.0 document. XML version found: 1.1.

...

Is there a configuration that I need to set to avoid this? Am I overlooking something obvious?

@sbalabanov-zz
Copy link
Contributor

There is no any setting that can result to this.
I suggest if you set a breakpoint in NGOutputStream and debug.

@angwe
Copy link
Author

angwe commented Nov 8, 2018

Since I am not a Java or C programmer, I'll just leave this here as a bug report. Presumably this kind of output mangling could be more of an issue for someone else.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants