[prev in list] [next in list] [prev in thread] [next in thread] 

List:       maven-dev
Subject:    cvs commit: maven/src/java/org/apache/maven/util HttpUtils.java
From:       evenisse () apache ! org
Date:       2004-07-30 16:54:35
Message-ID: 20040730165435.664.qmail () minotaur ! apache ! org
[Download RAW message or body]

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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic