Hi

I think this change fix a problem with invalid header, the problem the check
is done for String array of length zero and not if the String array is null

*** old/MailHeaders.java        Sun May 28 15:02:50 2000
--- MailHeaders.java    Sun May 28 15:02:25 2000
***************
*** 50,63 ****
      }

      public boolean isSet(String name) {
!         return super.getHeader(name).length != 0;
      }

      public boolean isValid() {
!             // Check if MimeMessage contains REQUIRED headers fields as
specified in RFC 822.
!         if (super.getHeader("Date").length == 0) return false;
!         if (super.getHeader("To").length == 0) return false;
!         if (super.getHeader("From").length == 0) return false;
!         return true;
      }
  }
--- 50,61 ----
      }

      public boolean isSet(String name) {
!         String[] value = super.getHeader(name);
!         return (value!=null && value.length != 0);
      }

      public boolean isValid() {
!         // Check if MimeMessage contains REQUIRED headers fields as
specified in RFC 822.
!         return (isSet("Date") && isSet("To") && isSet("From"));
      }
  }


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/>
Problems?:           [EMAIL PROTECTED]

Reply via email to