evenisse    2004/07/30 09:54:35

  Modified:    src/java/org/apache/maven/util Tag: MAVEN-1_0-BRANCH
                        HttpUtils.java
  Log:
  Use Locale.US as date format for If-Modified-Since header tag because it fails when 
server doesn't understand date in other format than english format.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.28.4.15 +2 -1      maven/src/java/org/apache/maven/util/HttpUtils.java
  
  Index: HttpUtils.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/util/HttpUtils.java,v
  retrieving revision 1.28.4.14
  retrieving revision 1.28.4.15
  diff -u -r1.28.4.14 -r1.28.4.15
  --- HttpUtils.java    6 Jul 2004 12:45:48 -0000       1.28.4.14
  +++ HttpUtils.java    30 Jul 2004 16:54:34 -0000      1.28.4.15
  @@ -31,6 +31,7 @@
   import java.net.URLConnection;
   import java.text.SimpleDateFormat;
   import java.util.Date;
  +import java.util.Locale;
   import java.util.TimeZone;
   
   import org.apache.commons.lang.StringUtils;
  @@ -447,7 +448,7 @@
           try {
               if ( timestamp >= 0 )
               {
  -                SimpleDateFormat fmt = new SimpleDateFormat("EEE, dd-MMM-yy 
HH:mm:ss zzz");
  +                SimpleDateFormat fmt = new SimpleDateFormat("EEE, dd-MMM-yy 
HH:mm:ss zzz", Locale.US);
                   fmt.setTimeZone(GMT_TIME_ZONE);
                   Header hdr = new Header("If-Modified-Since", fmt.format(new 
Date(timestamp)));
                   LOG.debug("sending ==> " + hdr + "(" + timestamp + ")");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to