ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37548] - Jar manifest lines too long
Date Mon, 10 Jul 2006 21:54:53 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37548>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37548


jkf@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From jkf@apache.org  2006-07-10 21:54 -------
(In reply to comment #7)
> I propose to use the jkd make72safe to write the manifest:
> 
>        /**
>          * Adds line breaks to enforce a maximum 72 bytes per line.
>          */
>         static void make72Safe(StringBuffer line) {
>             int length = line.length();
>             if (length > 72) {
>                 int index = 70;
>                 while (index < length - 2) {
>                     line.insert(index, "\r\n ");
>                     index += 72;
>                     length += 3;
>                 }
>             }
>             return;
>         }

Sorry, but that algorithm is not correct, it counts characters, not bytes. The
spec is specific about that the string must be UTF-8 encoded. I've applied my
patch, I prepared quite some time ago.

Please verify and reopen if this issue is not solved in HEAD.
Note that attribute names of 70 characters are still allowed, and will yield 74
byte long lines (including eol). For this attribute names of 69 or 70 characters
are treated separately.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

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


Mime
View raw message