You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Noel J. Bergman" <no...@devtech.com> on 2002/06/08 23:54:06 UTC
RelayLimit question
What is the difference between:
for (Enumeration e = mm.getAllHeaders(); e.hasMoreElements();) {
Header hdr = (Header)e.nextElement();
if (hdr.getName().equals("Received")) {
count++;
}
}
and
String headers[] = message.getHeader("Received");
count = headers.length;
If I'm not missing something, I'd just as soon make the code clearer (second
version).
--- Noel
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: RelayLimit question
Posted by Serge Knystautas <se...@lokitech.com>.
This is really a JavaMail question... you can see the source now to see
how it's different. a) counts the number of "Received:" headers in the
message. b) counts the number of lines of "Received:" headers (I do
believe). So,
Received: from here
by us
on now
Received: from overhere
by them
on yesterday
with a) count = 2, with b) count = 6
--
Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
Noel J. Bergman wrote:
> What is the difference between:
>
> for (Enumeration e = mm.getAllHeaders(); e.hasMoreElements();) {
> Header hdr = (Header)e.nextElement();
> if (hdr.getName().equals("Received")) {
> count++;
> }
> }
>
> and
>
> String headers[] = message.getHeader("Received");
> count = headers.length;
>
> If I'm not missing something, I'd just as soon make the code clearer (second
> version).
>
> --- Noel
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>