You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ve...@apache.org on 2008/10/05 21:29:31 UTC
svn commit: r701867 -
/webservices/commons/trunk/modules/transport/modules/mail/src/main/java/org/apache/axis2/transport/mail/MailTransportListener.java
Author: veithen
Date: Sun Oct 5 12:29:31 2008
New Revision: 701867
URL: http://svn.apache.org/viewvc?rev=701867&view=rev
Log:
MailTransportListener: Moved the filter on Status: RO to a more appropriate place.
Modified:
webservices/commons/trunk/modules/transport/modules/mail/src/main/java/org/apache/axis2/transport/mail/MailTransportListener.java
Modified: webservices/commons/trunk/modules/transport/modules/mail/src/main/java/org/apache/axis2/transport/mail/MailTransportListener.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/mail/src/main/java/org/apache/axis2/transport/mail/MailTransportListener.java?rev=701867&r1=701866&r2=701867&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/mail/src/main/java/org/apache/axis2/transport/mail/MailTransportListener.java (original)
+++ webservices/commons/trunk/modules/transport/modules/mail/src/main/java/org/apache/axis2/transport/mail/MailTransportListener.java Sun Oct 5 12:29:31 2008
@@ -181,8 +181,15 @@
}
for (int i = 0; i < total; i++) {
-
- if (messages[i].isSet(Flags.Flag.SEEN)) {
+ String[] status = messages[i].getHeader("Status");
+ if (status != null && status.length == 1 && status[0].equals("RO")) {
+ // some times the mail server sends a special mail message which is not relavent
+ // in processing. ignore this message.
+ if (log.isDebugEnabled()) {
+ log.debug("Skipping message # : " + i + " : " +
+ messages[i].getSubject() + " - Status: RO");
+ }
+ } else if (messages[i].isSet(Flags.Flag.SEEN)) {
if (log.isDebugEnabled()) {
log.debug("Skipping message # : " + i + " : " +
messages[i].getSubject() + " - already marked SEEN");
@@ -250,12 +257,6 @@
// populate transport headers using the mail headers
Map trpHeaders = getTransportHeaders(message, entry);
- // FIXME: we should already skip these messages in the checkMail method
- // some times the mail server sends a special mail message which is not relavent
- // in processing. ignore this message.
- if ((trpHeaders.get("Status") != null) && (trpHeaders.get("Status").equals("RO"))){
- return;
- }
// figure out content type of primary request. If the content type is specified, use it
// FIXME: shouldn't the content type always be specified by the message?
String contentType = entry.getContentType();