You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ge...@apache.org on 2010/02/24 18:08:23 UTC

svn commit: r915872 - in /incubator/trafficserver/traffic/branches/dev: ./ ci/ contrib/ iocore/eventsystem/ iocore/net/ libinktomi++/ proxy/ proxy/config/ proxy/congest/ proxy/http2/ test/plugin/INKNetConnect/

Author: georgep
Date: Wed Feb 24 17:08:22 2010
New Revision: 915872

URL: http://svn.apache.org/viewvc?rev=915872&view=rev
Log:
Merge lastest TS-188, TS-200, TS-202, TS-128, TS-205 and TS-164 [fenced off with #if defined(USE_OLD_EVENTFD) changes from trunk to dev before full 'dev' branch merge back to trunk.

Added:
    incubator/trafficserver/traffic/branches/dev/CHANGES
      - copied unchanged from r915837, incubator/trafficserver/traffic/trunk/CHANGES
    incubator/trafficserver/traffic/branches/dev/INSTALL
      - copied unchanged from r915837, incubator/trafficserver/traffic/trunk/INSTALL
    incubator/trafficserver/traffic/branches/dev/contrib/AdminClient.pm
      - copied unchanged from r915837, incubator/trafficserver/traffic/trunk/contrib/AdminClient.pm
Modified:
    incubator/trafficserver/traffic/branches/dev/   (props changed)
    incubator/trafficserver/traffic/branches/dev/.gitignore
    incubator/trafficserver/traffic/branches/dev/Makefile.am
    incubator/trafficserver/traffic/branches/dev/README
    incubator/trafficserver/traffic/branches/dev/STATUS
    incubator/trafficserver/traffic/branches/dev/ci/rat-excludes.txt
    incubator/trafficserver/traffic/branches/dev/configure.ac
    incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_EThread.h
    incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_ProtectedQueue.h
    incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_ProtectedQueue.h
    incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_UnixEThread.h
    incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNet.h
    incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNetProcessor.h
    incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc
    incubator/trafficserver/traffic/branches/dev/libinktomi++/ink_thread.h
    incubator/trafficserver/traffic/branches/dev/proxy/Makefile.am
    incubator/trafficserver/traffic/branches/dev/proxy/config/records.config.in
    incubator/trafficserver/traffic/branches/dev/proxy/config/storage.config
    incubator/trafficserver/traffic/branches/dev/proxy/congest/Congestion.h
    incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionDB.h
    incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionStats.cc
    incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionStats.h
    incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpTransact.cc
    incubator/trafficserver/traffic/branches/dev/test/plugin/INKNetConnect/INKNetConnectTest.c

Propchange: incubator/trafficserver/traffic/branches/dev/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 24 17:08:22 2010
@@ -1 +1 @@
-/incubator/trafficserver/traffic/trunk:891822-912050
+/incubator/trafficserver/traffic/trunk:891822-915837

Modified: incubator/trafficserver/traffic/branches/dev/.gitignore
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/.gitignore?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/.gitignore (original)
+++ incubator/trafficserver/traffic/branches/dev/.gitignore Wed Feb 24 17:08:22 2010
@@ -2,6 +2,7 @@
 *.a
 *.in
 *~
+*.tar.gz
 
 .deps
 

Modified: incubator/trafficserver/traffic/branches/dev/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/Makefile.am?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/Makefile.am (original)
+++ incubator/trafficserver/traffic/branches/dev/Makefile.am Wed Feb 24 17:08:22 2010
@@ -30,6 +30,8 @@
 DIST_BUILD_USER_GROUP=`id -ng`
 DISTCHECK_CONFIGURE_FLAGS=--with-user=${DIST_BUILD_USER} --with-group=${DIST_BUILD_USER_GROUP}
 
+EXTRA_DIST=CHANGES INSTALL STATUS NOTICE LICENSE
+
 installcheck-local:
 	$(DESTDIR)$(bindir)/traffic_server -R 1
 

Modified: incubator/trafficserver/traffic/branches/dev/README
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/README?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/README (original)
+++ incubator/trafficserver/traffic/branches/dev/README Wed Feb 24 17:08:22 2010
@@ -62,6 +62,8 @@
     libsqlite3-dev (or optionally, libdb-dev)
     libpcre3-dev
 
+For using sqlite3, we only support v3.5 or later (basically, we require the v2 APIs).
+
 
 4. BUILDING FROM SVN REPO
 

Modified: incubator/trafficserver/traffic/branches/dev/STATUS
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/STATUS?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/STATUS (original)
+++ incubator/trafficserver/traffic/branches/dev/STATUS Wed Feb 24 17:08:22 2010
@@ -10,7 +10,7 @@
     [NOTE that x.{odd}.z versions are strictly Alpha/Beta releases,
           while x.{even}.z versions are Stable/GA releases.]
 
-    2.0.0a   : In development
+    2.0.0-alpha   : In development
 
 
 Contributors looking for a mission:
@@ -29,3 +29,8 @@
 A list of all bugs scheduled for this release can be found at
 
   http://bit.ly/ATS-2a
+
+
+For the final 2.0.0 ATS release, see the bug list at
+
+  http://bit.ly/ATS-2-0-0

Modified: incubator/trafficserver/traffic/branches/dev/ci/rat-excludes.txt
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/ci/rat-excludes.txt?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/ci/rat-excludes.txt (original)
+++ incubator/trafficserver/traffic/branches/dev/ci/rat-excludes.txt Wed Feb 24 17:08:22 2010
@@ -10,6 +10,7 @@
 .gitignore
 .indent.pro
 aclocal.m4
+CHANGES
 m4/
 autom4te.cache/
 build-aux/

Modified: incubator/trafficserver/traffic/branches/dev/configure.ac
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/configure.ac?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/configure.ac (original)
+++ incubator/trafficserver/traffic/branches/dev/configure.ac Wed Feb 24 17:08:22 2010
@@ -320,6 +320,12 @@
    PATH_BDB_LIB="$with_bdb/lib"
 fi
 
+
+# Make sure there is at least one supported backend DB for SimpleDBM
+if test "${with_sqlite3}" = "no" -a "${with_libdb}" = "no"; then
+   AC_MSG_ERROR([Need at least one DB backend, --with-sqlite3 and --with-libdb are supported])
+fi
+
           
 #
 # Installation directories
@@ -600,7 +606,7 @@
 )
 
 if test "x${with_sqlite3}" = "xyes"; then
-  AC_CHECK_LIB([sqlite3], [sqlite3_open], 
+  AC_CHECK_LIB([sqlite3], [sqlite3_open_v2], 
     [AC_SUBST([LIBSQLITE3], ["-lsqlite3"])
     ],
     [AC_MSG_FAILURE([check for sqlite3 failed. Have you installed sqlite3-devel?])],

Modified: incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_EThread.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_EThread.h?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_EThread.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_EThread.h Wed Feb 24 17:08:22 2010
@@ -325,7 +325,9 @@
   unsigned int event_types;
   bool is_event_type(EventType et);
   void set_event_type(EventType et);
-
+#if defined(USE_OLD_EVENTFD)
+  int getEventFd();
+#endif
   // Private Interface
 
   void execute();

Modified: incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_ProtectedQueue.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_ProtectedQueue.h?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_ProtectedQueue.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_ProtectedQueue.h Wed Feb 24 17:08:22 2010
@@ -47,12 +47,19 @@
   void remove(Event * e);
   Event *dequeue_local();
   void dequeue_timed(ink_hrtime cur_time, ink_hrtime timeout, bool sleep);
-
+#if defined(USE_OLD_EVENTFD)
+  void setWriteFd(int );
+  void setReadFd(int );
+  int getReadFd();
+#endif
   InkAtomicList al;
   ink_mutex lock;
   ink_cond might_have_data;
   Que(Event, link) localQueue;
-
+#if defined(USE_OLD_EVENTFD)
+  int write_pipe_fd;
+  int read_pipe_fd;
+#endif
   ProtectedQueue();
 };
 

Modified: incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_ProtectedQueue.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_ProtectedQueue.h?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_ProtectedQueue.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_ProtectedQueue.h Wed Feb 24 17:08:22 2010
@@ -35,6 +35,9 @@
 
 inline
 ProtectedQueue::ProtectedQueue()
+#if defined(USE_OLD_EVENTFD)
+:write_pipe_fd(-1),read_pipe_fd(-1)
+#endif
 {
   Event e;
   ink_mutex_init(&lock, "ProtectedQueue");
@@ -46,22 +49,48 @@
 ProtectedQueue::signal()
 {
   // Need to get the lock before you can signal the thread
-  ink_mutex_acquire(&lock);
-  ink_cond_signal(&might_have_data);
-  ink_mutex_release(&lock);
+#if defined(USE_OLD_EVENTFD)
+  if(write_pipe_fd!=-1) {
+    int retVal = socketManager.write(write_pipe_fd,(void*)"W",1);
+    if(retVal <= 0) {
+      int fd = write_pipe_fd;
+      socketManager.close(fd);
+    }
+  } else {
+#endif
+    ink_mutex_acquire(&lock);
+    ink_cond_signal(&might_have_data);
+    ink_mutex_release(&lock);
+#if defined(USE_OLD_EVENTFD)
+  }
+#endif
 }
 
 inline int
 ProtectedQueue::try_signal()
 {
   // Need to get the lock before you can signal the thread
-  if (ink_mutex_try_acquire(&lock)) {
-    ink_cond_signal(&might_have_data);
-    ink_mutex_release(&lock);
+#if defined(USE_OLD_EVENTFD)
+  if(write_pipe_fd!=-1) {
+    int retVal = socketManager.write(write_pipe_fd,(void*)"W",1);
+    if(retVal <= 0) {
+      int fd = write_pipe_fd;
+      write_pipe_fd = read_pipe_fd = -1;
+      socketManager.close(fd);
+    }
     return 1;
   } else {
-    return 0;
+#endif
+    if (ink_mutex_try_acquire(&lock)) {
+      ink_cond_signal(&might_have_data);
+      ink_mutex_release(&lock);
+      return 1;
+    } else {
+      return 0;
+    }
+#if defined(USE_OLD_EVENTFD)
   }
+#endif
 }
 
 // Called from the same thread (don't need to signal)
@@ -93,4 +122,28 @@
   return e;
 }
 
+#if defined(USE_OLD_EVENTFD)
+INK_INLINE void 
+ProtectedQueue::setReadFd(int fd)
+{
+  read_pipe_fd = fd;
+}
+
+INK_INLINE void 
+ProtectedQueue::setWriteFd(int fd)
+{
+  write_pipe_fd = fd;
+}
+
+INK_INLINE int 
+ProtectedQueue::getReadFd()
+{
+  int pfd[2] = {-1,-1};
+  ink_create_pipe(pfd);
+  setReadFd(pfd[0]);
+  setWriteFd(pfd[1]);
+  return pfd[0];
+}
+#endif /* USE_OLD_EVENTFD */
+
 #endif

Modified: incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_UnixEThread.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_UnixEThread.h?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_UnixEThread.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_UnixEThread.h Wed Feb 24 17:08:22 2010
@@ -162,5 +162,12 @@
   EVENT_FREE(e, eventAllocator, this);
 }
 
+#if defined(USE_OLD_EVENTFD)
+INK_INLINE int 
+EThread::getEventFd()
+{
+  return EventQueueExternal.getReadFd();
+}
+#endif
 
 #endif /*_EThread_h_*/

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNet.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNet.h?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNet.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNet.h Wed Feb 24 17:08:22 2010
@@ -125,6 +125,9 @@
     DNSConnection *dnscon;
     NetAccept *na;
     UnixUDPConnection *uc;
+#if defined(USE_OLD_EVENTFD)
+    int fd;
+#endif
   } data;
   int start(EventLoop l, DNSConnection *vc, int events);
   int start(EventLoop l, NetAccept *vc, int events);

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNetProcessor.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNetProcessor.h?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNetProcessor.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNetProcessor.h Wed Feb 24 17:08:22 2010
@@ -110,6 +110,8 @@
 // accept such events by the EventProcesor.
 //
 extern void initialize_thread_for_net(EThread * thread, int thread_index);
-
+#if defined(USE_OLD_EVENTFD)
+extern void initialize_eventfd(EThread * thread);
+#endif
 //#include "UnixNet.h"
 #endif

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc Wed Feb 24 17:08:22 2010
@@ -214,6 +214,9 @@
   else
     pd->eio = ev_loop_new(LIBEV_BACKEND_LIST);
 #endif
+#if defined(USE_OLD_EVENTFD)
+  initialize_eventfd(thread);
+#endif
   thread->schedule_imm(get_NetHandler(thread));
 
 #ifndef INACTIVITY_TIMEOUT
@@ -231,6 +234,28 @@
 #endif
 }
 
+#if defined(USE_OLD_EVENTFD)
+void initialize_eventfd(EThread *thread) {
+
+  int fd = thread->getEventFd();
+  PollDescriptor *pd = get_PollDescriptor(thread);
+  struct epoll_data_ptr *eptr;
+  eptr = (struct epoll_data_ptr *) xmalloc(sizeof(struct epoll_data_ptr));
+  eptr->type = EVENTFD;
+  eptr->data.fd = fd;
+
+
+  struct epoll_event ev;
+  memset(&ev, 0, sizeof(struct epoll_event));
+
+  ev.events = EPOLLIN | EPOLLET;
+  ev.data.ptr = eptr;
+  if (epoll_ctl(pd->epoll_fd, EPOLL_CTL_ADD, fd, &ev) < 0) {
+    Debug("iocore_net", "acceptEvent : Failed to add event add to list epoll list\n");
+  }
+}
+#endif /* USE_OLD_EVENTFD */
+
 // NetHandler method definitions
 
 NetHandler::NetHandler():Continuation(NULL), trigger_event(0)
@@ -393,9 +418,24 @@
 	epd->refresh(EVENTIO_READ);
 #endif
       }
-    } else if (epd->type == EVENTIO_ASYNC_SIGNAL){
+    } 
+#if !defined(USE_OLD_EVENTFD)
+    else if (epd->type == EVENTIO_ASYNC_SIGNAL){
       net_signal_hook_callback(trigger_event->ethread);
+    } 
+#else /* USE_OLD_EVENTFD */
+    else if (epd->type == EVENTFD) { // use: EVENTIO_ASYNC_SIGNAL
+      char buf[1024];
+      int retVal=-1;
+      do {
+        retVal = socketManager.read(epd->data.fd,&buf,1024);
+      } while(retVal == 1024);
+      if (retVal <=0) {
+        socketManager.close(epd->data.fd);
+        initialize_eventfd(e->ethread);
+      }
     }
+#endif /* USE_OLD_EVENTFD */
     ev_next_event(pd,x);
   }
 

Modified: incubator/trafficserver/traffic/branches/dev/libinktomi++/ink_thread.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/libinktomi%2B%2B/ink_thread.h?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/libinktomi++/ink_thread.h (original)
+++ incubator/trafficserver/traffic/branches/dev/libinktomi++/ink_thread.h Wed Feb 24 17:08:22 2010
@@ -306,6 +306,14 @@
   pthread_exit(status);
 }
 
+#if defined(USE_OLD_EVENTFD)
+static inline void
+ink_create_pipe( int pfd[2])
+{
+  ink_assert(pipe(pfd)==0);
+}
+#endif
+
 #endif /* #if defined(POSIX_THREAD) */
 
 #endif /*_INK_THREAD_H*/

Modified: incubator/trafficserver/traffic/branches/dev/proxy/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/Makefile.am?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/Makefile.am (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/Makefile.am Wed Feb 24 17:08:22 2010
@@ -390,6 +390,7 @@
 	-rm -rf $(DESTDIR)$(pkglocalstatedir) $(DESTDIR)$(pkglogdir) $(DESTDIR)$(pkgsysconfdir) $(DESTDIR)$(pkglibexecdir)
 
 install-exec-hook:
+	chown -R $(pkgsysuser):$(pkgsysgroup) $(DESTDIR)$(pkgsysconfdir) $(DESTDIR)$(pkglibexecdir) $(DESTDIR)$(pkgdatadir)
 	-echo $(DESTDIR)$(prefix) > $(DESTDIR)$(prefix)/etc/traffic_server
 
 uninstall-hook:

Modified: incubator/trafficserver/traffic/branches/dev/proxy/config/records.config.in
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/config/records.config.in?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/config/records.config.in (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/config/records.config.in Wed Feb 24 17:08:22 2010
@@ -255,8 +255,8 @@
 CONFIG proxy.config.http.cache.when_to_add_no_cache_to_msie_requests INT 0
    # required headers: three options:
    #   0 - No required headers to make document cachable
-   #   1 - at least, "Last-Modified:" header required
-   #   2 - explicit lifetime required, "Expires:" or "Cache-Control:"
+   #   1 - "Last-Modified:", "Expires:", or "Cache-Control: max-age" required
+   #   2 - explicit lifetime required, "Expires:" or "Cache-Control: max-age"
 CONFIG proxy.config.http.cache.required_headers INT 1
 CONFIG proxy.config.http.cache.max_stale_age INT 604800
 CONFIG proxy.config.http.cache.range.lookup INT 1

Modified: incubator/trafficserver/traffic/branches/dev/proxy/config/storage.config
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/config/storage.config?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/config/storage.config (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/config/storage.config Wed Feb 24 17:08:22 2010
@@ -19,8 +19,8 @@
 #
 # Example: 512MB cache file(/usr/local/var/trafficserver/cache.db) 
 #          assuming prefix of '/usr/local'
-./var/trafficserver 536870912
-#./var/trafficserver 134217728
+#./var/trafficserver 536870912
+./var/trafficserver 150994944
 #
 #
 #############################################################

Modified: incubator/trafficserver/traffic/branches/dev/proxy/congest/Congestion.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/congest/Congestion.h?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/congest/Congestion.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/congest/Congestion.h Wed Feb 24 17:08:22 2010
@@ -23,7 +23,7 @@
 
 /*****************************************************************************
  *
- *  Congestion.h - Implementation of KDDI Congestion Control
+ *  Congestion.h - Implementation of Congestion Control
  *
  *
  ****************************************************************************/

Modified: incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionDB.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionDB.h?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionDB.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionDB.h Wed Feb 24 17:08:22 2010
@@ -23,7 +23,7 @@
 
 /*****************************************************************************
  *
- *  CongestionDB.h - Implementation of KDDI Congestion Control
+ *  CongestionDB.h - Implementation of Congestion Control
  *
  *
  ****************************************************************************/

Modified: incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionStats.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionStats.cc?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionStats.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionStats.cc Wed Feb 24 17:08:22 2010
@@ -23,7 +23,7 @@
 
 /*****************************************************************************
  *
- *  CongestionStats.cc - Implementation of KDDI Congestion Control
+ *  CongestionStats.cc - Implementation of Congestion Control
  *
  *
  ****************************************************************************/

Modified: incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionStats.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionStats.h?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionStats.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/congest/CongestionStats.h Wed Feb 24 17:08:22 2010
@@ -23,7 +23,7 @@
 
 /*****************************************************************************
  *
- *  CongestionStats.h - Implementation of KDDI Congestion Control
+ *  CongestionStats.h - Implementation of Congestion Control
  *
  *
  ****************************************************************************/

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpTransact.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpTransact.cc?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpTransact.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpTransact.cc Wed Feb 24 17:08:22 2010
@@ -7151,7 +7151,7 @@
     // If a ttl is set: no header required for caching
     // otherwise: follow parameter http.cache.required_headers
     if (s->cache_control.ttl_in_cache <= 0) {
-
+      inku32 cc_mask = (MIME_COOKED_MASK_CC_MAX_AGE | MIME_COOKED_MASK_CC_S_MAXAGE);
       // server did not send expires header or last modified
       // and we are configured to not cache without them.
       switch (s->http_config_param->cache_required_headers) {
@@ -7160,8 +7160,9 @@
         break;
 
       case HttpConfigParams::CACHE_REQUIRED_HEADERS_AT_LEAST_LAST_MODIFIED:
-        if (!response->presence(MIME_PRESENCE_EXPIRES) && !response->get_last_modified()) {
-          Debug("http_trans", "[is_response_cacheable] " "last_modified required");
+        if (!response->presence(MIME_PRESENCE_EXPIRES) && !(response->get_cooked_cc_mask() & cc_mask) && 
+            !response->get_last_modified()) {
+          Debug("http_trans", "[is_response_cacheable] " "last_modified, expires, or max-age is required");
 
           // Set the WUTS code to NO_DLE or NO_LE only for 200 responses.
           if (response_code == HTTP_STATUS_OK) {
@@ -7173,8 +7174,8 @@
         break;
 
       case HttpConfigParams::CACHE_REQUIRED_HEADERS_CACHE_CONTROL:
-        if (!response->presence(MIME_PRESENCE_EXPIRES | MIME_PRESENCE_CACHE_CONTROL)) {
-          Debug("http_trans", "[is_response_cacheable] " "cache-control or expires header is required");
+        if (!response->presence(MIME_PRESENCE_EXPIRES) && !(response->get_cooked_cc_mask() & cc_mask)) {
+          Debug("http_trans", "[is_response_cacheable] " "expires header or max-age is required");
           return (false);
         }
         break;

Modified: incubator/trafficserver/traffic/branches/dev/test/plugin/INKNetConnect/INKNetConnectTest.c
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/test/plugin/INKNetConnect/INKNetConnectTest.c?rev=915872&r1=915871&r2=915872&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/test/plugin/INKNetConnect/INKNetConnectTest.c (original)
+++ incubator/trafficserver/traffic/branches/dev/test/plugin/INKNetConnect/INKNetConnectTest.c Wed Feb 24 17:08:22 2010
@@ -1,26 +1,25 @@
 /** @file
 
-  a brief file description
+    A brief file description
 
-  @section license license
-
-  licensed to the apache software foundation (asf) under one
-  or more contributor license agreements.  see the notice file
-  distributed with this work for additional information
-  regarding copyright ownership.  the asf licenses this file
-  to you under the apache license, version 2.0 (the
-  "license"); you may not use this file except in compliance
-  with the license.  you may obtain a copy of the license at
-
-      http://www.apache.org/licenses/license-2.0
-
-  unless required by applicable law or agreed to in writing, software
-  distributed under the license is distributed on an "as is" basis,
-  without warranties or conditions of any kind, either express or implied.
-  see the license for the specific language governing permissions and
-  limitations under the license.
- */
+    @section license License
 
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
 #include <stdio.h>
 #include <string.h>
 #include "ts.h"