projects
/
org.ibex.mail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6c4ddad
)
improve logic for header-stripping in MIME.java
author
adam
<adam@megacz.com>
Thu, 5 Jul 2007 21:47:51 +0000
(21:47 +0000)
committer
adam
<adam@megacz.com>
Thu, 5 Jul 2007 21:47:51 +0000
(21:47 +0000)
darcs-hash:
20070705214751
-5007d-
e6e30f99559379fd4159e10142a5e9bde9d212d3
.gz
src/org/ibex/mail/MIME.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/mail/MIME.java
b/src/org/ibex/mail/MIME.java
index
5b62faa
..
477ce63
100644
(file)
--- a/
src/org/ibex/mail/MIME.java
+++ b/
src/org/ibex/mail/MIME.java
@@
-56,11
+56,10
@@
public class MIME {
ctype = "application/octet-stream";
}
this.contentType = new ContentType(ctype, headers.get("content-description"), headers.get("content-id"), encoding);
ctype = "application/octet-stream";
}
this.contentType = new ContentType(ctype, headers.get("content-description"), headers.get("content-id"), encoding);
- final long bodylength = fount.getLength() - h.getLength() - 2; /*CRLF*/
// FIXME: this is a horrible, tangled mess.
this.body = new Fountain() {
// FIXME: this is a horrible, tangled mess.
this.body = new Fountain() {
- public int getNumLines() { return Stream.countLines(getStream()); }
- public long getLength() { return bodylength; }
+ public int getNumLines() { return Stream.countLines(this.getStream()); }
+ public long getLength() { return Stream.countBytes(this.getStream()); }
public Stream getStream() { return transformBodyStream(Headers.skip(fount.getStream())); }
};
this.all =
public Stream getStream() { return transformBodyStream(Headers.skip(fount.getStream())); }
};
this.all =