You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2010/05/07 01:40:43 UTC

svn commit: r941972 [3/3] - in /trafficserver/traffic/trunk: iocore/block-cache/ iocore/cache/ iocore/cluster/ iocore/dns/ iocore/eventsystem/ iocore/fastio/include/ iocore/fastio/inkfio/ iocore/fastio/inkudp/ iocore/fastio/libfastIO/ iocore/fastio/too...

Modified: trafficserver/traffic/trunk/test/SDKtest/client/api/SimBasicAuth-1.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/SDKtest/client/api/SimBasicAuth-1.c?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/SDKtest/client/api/SimBasicAuth-1.c (original)
+++ trafficserver/traffic/trunk/test/SDKtest/client/api/SimBasicAuth-1.c Thu May  6 23:40:41 2010
@@ -208,16 +208,6 @@ INKRequestCreate(char *origin_server_hos
             "GET /%ld/length%ld HTTP/1.0\r\nAccept: */*\r\nHost: %s:%s\r\nProxy-Authorization: Basic %s\r\n\r\n",
             serial_number, doc_size, origin_server_host, origin_server_port, my_plugin.credentials);
   }
-#if 0
-  else {
-    sprintf(origin_server_host, my_plugin.target_host);
-    sprintf(origin_server_port, my_plugin.target_port);
-    sprintf(request_buf,
-            "GET http://%s:%s/%ld/length%ld HTTP/1.0\r\nAccept: */*\r\nProxy-Authorization: Basic %s\r\n\r\n",
-            my_plugin.origin_host[origin_server_num],
-            my_plugin.origin_port[origin_server_num], serial_number, doc_size, my_plugin.credentials);
-  }
-#endif
   /* SDKtest in "Proxy" mode */
   else {
     printf("credentials: %s\n", my_plugin.credentials);

Modified: trafficserver/traffic/trunk/test/plugin/INKContinuations/ServerSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/INKContinuations/ServerSM.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/INKContinuations/ServerSM.cc (original)
+++ trafficserver/traffic/trunk/test/plugin/INKContinuations/ServerSM.cc Thu May  6 23:40:41 2010
@@ -883,59 +883,6 @@ server_state_done(INKCont contp, int eve
 // Next States:
 //
 //////////////////////////////////////////////////////////////////////////
-#if 0
-int
-state_dns_lookup(int event, INKDNSInfo host_info)
-{
-  ENTER_STATE(serversm, Server->q_sm_id, state_dns_lookup, event);
-
-  assert(Server->q_server_name);
-  if (event != INK_EVENT_DNS_LOOKUP) {
-    //      Server->q_error_type = RAFT_INTERNAL_PROXY_ERROR;
-    INKDebug("serversm", "[%u][state_dns_lookup], unexpected event", Server->q_sm_id);
-
-    if (Server->q_server_vc) {
-      INKVConnAbort(Server->q_server_vc, 1);
-      Server->q_server_vc = NULL;
-    }
-    Server->q_server_read_vio = NULL;
-    Server->q_server_write_vio = NULL;
-
-    return call_back_sub_sm_with_error();
-  }
-  // ok, the dns processor always returns an EVENT_HOST_DB_LOOKUP
-  // regardless of whether there was success or not. however, if
-  // it calls us back with a null hostdbinfo structure, it means
-  // that the lookup was unsuccessful.
-  if (!host_info) {
-    //        Server->q_error_type = RAFT_DNS_FAILURE;
-    INKDebug("serversm", "[%u][state_dns_lookup] Unable to resolve DNS for %s", Server->q_sm_id, Server->q_server_name);
-
-    // FUTURE: we may at some point want to try doing automatic
-    // name expansion (appending local domain name or prepending www) 
-    // and retrying the dns lookup. for now, however, just bail out.
-
-    return call_back_sub_sm_with_error();
-  }
-  // ok, we have DNS resolution. set the ip address and connect to the server.
-  Server->q_server_ip = INKDNSInfoIPGet(host_info);
-
-  assert(Server->q_server_ip > 0);
-  assert(Server->q_server_port > 0);
-
-  // issue server connect.
-  unsigned char *p = (unsigned char *) &(Server->q_server_ip);
-  INKDebug("serversm", "[%u][state_dns_resolve] %s has resolved to %d.%d.%d.%d:%d",
-           Server->q_sm_id, Server->q_server_name, p[0], p[1], p[2], p[3], Server->q_server_port);
-
-//    SET_HANDLER((ServerSMHandler)&state_connect_to_server);
-  set_handler(Server->q_server_current_handler, &state_connect_to_server);
-  Server->q_pending_action = INKNetConnect(contp, Server->q_server_ip, Server->q_server_port);
-
-  return INK_EVENT_IMMEDIATE;
-}
-
-#endif
 
 int
 state_dns_lookup(INKCont contp, int event, INKHostDBInfo host_info)

Modified: trafficserver/traffic/trunk/test/plugin/INKFopen/INKFopen.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/INKFopen/INKFopen.c?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/INKFopen/INKFopen.c (original)
+++ trafficserver/traffic/trunk/test/plugin/INKFopen/INKFopen.c Thu May  6 23:40:41 2010
@@ -612,11 +612,6 @@ INKfopen_plugin(INKCont contp, INKEvent 
   switch (event) {
   case INK_EVENT_HTTP_OS_DNS:
 
-#if 0
-    status = INKfopenTest(txnp, contp);
-
-    status += INKMemAllocTest(txnp, contp);
-#endif
 
     status += INKThreadTest(txnp, contp);
 

Modified: trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpHook.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpHook.c?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpHook.c (original)
+++ trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpHook.c Thu May  6 23:40:41 2010
@@ -35,125 +35,6 @@ TODO TRANSFORM hooks are not "global" bu
 #include <stdio.h>
 
 
-#if 0
-/************************************************************************** 
- * HTTP sessions 
- *************************************************************************/
-
-/* HTTP hooks */
-inkapi void INKHttpHookAdd(INKHttpHookID id, INKCont contp);
-typedef enum
-{
-  INK_HTTP_READ_REQUEST_HDR_HOOK,
-  INK_HTTP_OS_DNS_HOOK,
-  INK_HTTP_SEND_REQUEST_HDR_HOOK,
-  INK_HTTP_READ_CACHE_HDR_HOOK,
-  INK_HTTP_READ_RESPONSE_HDR_HOOK,
-  INK_HTTP_SEND_RESPONSE_HDR_HOOK,
-  INK_HTTP_REQUEST_TRANSFORM_HOOK,
-  INK_HTTP_RESPONSE_TRANSFORM_HOOK,
-  INK_HTTP_SELECT_ALT_HOOK,
-  INK_HTTP_TXN_START_HOOK,
-  INK_HTTP_TXN_CLOSE_HOOK,
-  INK_HTTP_SSN_START_HOOK,
-  INK_HTTP_SSN_CLOSE_HOOK,
-
-  INK_HTTP_LAST_HOOK
-} INKHttpHookID;
-
-typedef enum
-{
-  INK_EVENT_NONE = 0,
-  INK_EVENT_IMMEDIATE = 1,
-  INK_EVENT_TIMEOUT = 2,
-  INK_EVENT_ERROR = 3,
-  INK_EVENT_CONTINUE = 4,
-  INK_CACHE_COULD_NOT_FIND = 5,
-  INK_CACHE_LOOKUP_COMPLETE = 6,
-  INK_CACHE_TIMEOUT_ERROR = 7,
-
-  INK_EVENT_VCONN_READ_READY = 100,
-  INK_EVENT_VCONN_WRITE_READY = 101,
-  INK_EVENT_VCONN_READ_COMPLETE = 102,
-  INK_EVENT_VCONN_WRITE_COMPLETE = 103,
-  INK_EVENT_VCONN_EOS = 104,
-  INK_EVENT_VCONN_INACTIVITY_TIMEOUT = 105,
-
-  INK_EVENT_NET_CONNECT = 200,
-  INK_EVENT_NET_CONNECT_FAILED = 201,
-  INK_EVENT_NET_ACCEPT = 202,
-  INK_EVENT_NET_ACCEPT_FAILED = 204,
-
-  INK_EVENT_DNS_LOOKUP = 500,
-
-  INK_EVENT_CACHE_OPEN_READ = 1102,
-  INK_EVENT_CACHE_OPEN_READ_FAILED = 1103,
-  INK_EVENT_CACHE_OPEN_WRITE = 1108,
-  INK_EVENT_CACHE_OPEN_WRITE_FAILED = 1109,
-  INK_EVENT_CACHE_REMOVE = 1112,
-  INK_EVENT_CACHE_REMOVE_FAILED = 1113,
-  INK_EVENT_CACHE_SCAN = 1120,
-  INK_EVENT_CACHE_SCAN_FAILED = 1121,
-  INK_EVENT_CACHE_SCAN_OBJECT = 1122,
-  INK_EVENT_CACHE_SCAN_DONE = 1123,
-
-  /* Used by INKHttpSssnReenable() to cont/term a _session_ */
-  /* Used by INKHttpTxnReenable()  to cont/term a _transaction_ */
-  INK_EVENT_HTTP_CONTINUE = 60000,
-  INK_EVENT_HTTP_ERROR = 60001,
-
-
-  INK_EVENT_HTTP_READ_REQUEST_HDR = 60002,
-  INK_EVENT_HTTP_OS_DNS = 60003,
-  INK_EVENT_HTTP_SEND_REQUEST_HDR = 60004,
-  INK_EVENT_HTTP_READ_CACHE_HDR = 60005,
-  INK_EVENT_HTTP_READ_RESPONSE_HDR = 60006,
-  INK_EVENT_HTTP_SEND_RESPONSE_HDR = 60007,
-  INK_EVENT_HTTP_REQUEST_TRANSFORM = 60008,
-  INK_EVENT_HTTP_RESPONSE_TRANSFORM = 60009,
-  INK_EVENT_HTTP_SELECT_ALT = 60010,
-  INK_EVENT_HTTP_TXN_START = 60011,
-  INK_EVENT_HTTP_TXN_CLOSE = 60012,
-  INK_EVENT_HTTP_SSN_START = 60013,
-  INK_EVENT_HTTP_SSN_CLOSE = 60014,
-
-  INK_EVENT_MGMT_UPDATE = 60100
-} INKEvent;
-
-
-1. inkapi void INKHttpHookAdd(INKHttpHookID id, INKCont contp);
-Called for each of 13 known HookIDs specified in INKHttpHookID.
-  2. inkapi void INKHttpSsnHookAdd(INKHttpSsn ssnp, INKHttpHookID id, INKCont contp);
-
-Called for each of 13 known HookIDs specified in INKHttpHookID.
-  3. inkapi void INKHttpSsnReenable(INKHttpSsn ssnp, INKEvent event);
-INK_EVENT_HTTP_CONTINUE INK_EVENT_HTTP_ERROR HTTP Transactions 4. void
-INKHttpTxnReenable(INKHttpTxn txnp, INKEvent INK_EVENT_HTTP_ERROR)
-INK_EVENT_HTTP_CONTINUE INK_EVENT_HTTP_ERROR
-/************************************************************************** 
- * HTTP sessions 
- *************************************************************************/
-#endif
-#if 0
-typedef enum
-{
-  INK_HTTP_READ_REQUEST_HDR_HOOK,
-  INK_HTTP_OS_DNS_HOOK,
-  INK_HTTP_SEND_REQUEST_HDR_HOOK,
-  INK_HTTP_READ_CACHE_HDR_HOOK,
-  INK_HTTP_READ_RESPONSE_HDR_HOOK,
-  INK_HTTP_SEND_RESPONSE_HDR_HOOK,
-  INK_HTTP_REQUEST_TRANSFORM_HOOK,
-  INK_HTTP_RESPONSE_TRANSFORM_HOOK,
-  INK_HTTP_SELECT_ALT_HOOK,
-  INK_HTTP_TXN_START_HOOK,
-  INK_HTTP_TXN_CLOSE_HOOK,
-  INK_HTTP_SSN_START_HOOK,
-  INK_HTTP_SSN_CLOSE_HOOK,
-
-  INK_HTTP_LAST_HOOK
-} INKHttpHookID;
-#endif
 
 const char *const INKEventStrId[] = {
   "INK_EVENT_HTTP_CONTINUE",    /* 60000 */
@@ -287,18 +168,6 @@ INKHttpHook(INKCont contp, INKEvent even
     ChkEvents(INK_EVENT_HTTP_SSN_START);
     INKHttpTxnReenable(txnp, INK_EVENT_HTTP_CONTINUE);
 
-#if 0
-    /* For this session, call this plug-in back at the start
-     * of each txn 
-     */
-    INKHttpSsnHookAdd(ssnp, INK_HTTP_TXN_START_HOOK, contp);
-
-    if (ssn_start_firstTime) {
-      INKHttpSsnReenable(ssnp, INK_EVENT_HTTP_CONTINUE);
-      ssn_start_firstTime = B_FALSE;
-    } else
-      INKHttpSsnReenable(ssnp, INK_EVENT_HTTP_ERROR);
-#endif
     break;
 
   case INK_EVENT_HTTP_SSN_CLOSE:
@@ -320,17 +189,6 @@ INKHttpHook(INKCont contp, INKEvent even
 
     INKHttpTxnReenable(txnp, INK_EVENT_HTTP_CONTINUE);
 
-#if 0
-    /* For this session, call this plug-in back at the close
-     * of each txn 
-     */
-    INKHttpSsnHookAdd(ssnp, INK_HTTP_TXN_CLOSE_HOOK, contp);
-    if (ssn_close_firstTime) {
-      INKHttpSsnReenable(ssnp, INK_EVENT_HTTP_CONTINUE);
-      ssn_close_firstTime = B_FALSE;
-    } else
-      INKHttpSsnReenable(ssnp, INK_EVENT_HTTP_ERROR);
-#endif
     break;
 
   default:

Modified: trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpSsnHookAdd.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpSsnHookAdd.c?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpSsnHookAdd.c (original)
+++ trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpSsnHookAdd.c Thu May  6 23:40:41 2010
@@ -33,24 +33,6 @@ Tests for registering/processing events 
 #include <stdio.h>
 
 
-#if 0
-/************************************************************************** 
- * HTTP Sessions 
- *************************************************************************/
-
-1. inkapi void INKHttpHookAdd(INKHttpHookID id, INKCont contp);
-   Covered in INKHttpHookAdd.c
-2. inkapi void INKHttpSsnHookAdd(INKHttpSsn ssnp, INKHttpHookID id, INKCont contp);
-   Called for all events except INK_HTTP_SESSION_START, INK_EVENT_MGMT_UPDATE.
-3. inkapi void INKHttpSsnReenable(INKHttpSsn ssnp, INKEvent event);
-INK_EVENT_HTTP_CONTINUE
-TODO build a test case for event INK_EVENT_HTTP_ERROR HTTP Transactions
-4. void INKHttpTxnReenable(INKHttpTxn txnp, INKEvent INK_EVENT_HTTP_ERROR)
-   INK_EVENT_HTTP_ERROR is covered in INKHttpReenableStop.c INK_EVENT_HTTP_CONTINUE
-/************************************************************************** 
- * HTTP sessions 
- *************************************************************************/
-#endif
 const char *const
   INKEventStrId[] = {
   "INK_EVENT_HTTP_CONTINUE",    /* 60000 */

Modified: trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTransaction.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTransaction.c?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTransaction.c (original)
+++ trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTransaction.c Thu May  6 23:40:41 2010
@@ -24,114 +24,6 @@
 
 #include "ts.h"
 
-#if 0
-
-/* HTTP transactions */
-
-/* Read from cache as soon as write from cache completes, i.e., we
- * should be able to call INKHttpTxnCachedReqGet during the initial req.
- * from a cache miss.   
- * INK_HTTP_SEND_RESPONSE_HDR_HOOK 
- * INH_HTTP_TXN_CLOSE_HOOK
- * 
- * If above fails, i.e., cannot call this API on a cache miss even after 
- * a write to cache has completed then call only on a cache hit.
-*/
-inkapi int INKHttpTxnCachedReqGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-inkapi int INKHttpTxnCachedRespGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-
-
-/* Call as soon as we have a transaction: INK_HTTP_TXN_START
-Client port */
-inkapi int INKHttpTxnClientIncomingPortGet(INKHttpTxn txnp);
-
-/* Call as soon as we have a transaction: INK_HTTP_TXN_START
-/* Client IP for a transaction (not incoming) */
-inkapi unsigned int INKHttpTxnClientIPGet(INKHttpTxn txnp);
-
-/* Non-cached, 
- * get client req after recieving INK_HTTP_READ_REQUEST_HDR_HOOK 
-*/
-inkapi int INKHttpTxnClientReqGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-/* Non-cached, 
- * get "client" resp after recieving INK_HTTP_READ_RESPONSE_HDR_HOOK 
-*/
-inkapi int INKHttpTxnClientRespGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-
-/* This is a response to a client (req), which will be executed after reciept
- * of: 
- *   1. INK_HTTP_OS_DNS_HOOK fails for some reason to do the translation
- *   2. INK_HTTP_READ_RESPONSE_HDR_HOOK origin server replied with some 
- *      type of error. 
- *   3. An error is possible at any point in HTTP processing.
-*/
-inkapi void INKHttpTxnErrorBodySet(INKHttpTxn txnp, char *buf, int buflength, char *mimetype);
-
-/* DONE */
-inkapi void INKHttpTxnHookAdd(INKHttpTxn txnp, INKHttpHookID id, INKCont contp);
-
-/* Origin Server (destination) or Parent IP */
-inkapi unsigned int INKHttpTxnNextHopIPGet(INKHttpTxn txnp);
-
-/* Results if parent proxy not enabled, results if parent proxy is enabled
-*/
-inkapi void INKHttpTxnParentProxyGet(INKHttpTxn txnp, char **hostname, int *port);
-/* hostname is copied into the txn and is deletable upon return
-*/
-inkapi void INKHttpTxnParentProxySet(INKHttpTxn txnp, char *hostname, int port);
-
-/*  */
-inkapi void INKHttpTxnReenable(INKHttpTxn txnp, INKEvent event);
-
-/* 
- * Origin Server IP
- * DETAILS: zero before INK_HTTP_OS_DNS_HOOK 
- *          IP addr after INK_HTTP_OS_DNS_HOOK 
-*/
-inkapi unsigned int INKHttpTxnServerIPGet(INKHttpTxn txnp);
-
-/* Need a transaction and a request: earliest point is 
- * not INK_HTTP_TXN_START_HOOK but INK_HTTP_READ_REQUEST_HDR_HOOK
- * process the request.
-*/
-inkapi int INKHttpTxnServerReqGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-
-/* Need a transaction and a server response: earliest point is 
- * INK_HTTP_READ_RESPONSE_HDR_HOOK, then process the response. 
-*/
-inkapi int INKHttpTxnServerRespGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-
-
-/* Call this as soon as a transaction has been created and retrieve the session
- * and do some processing.
-*/
-inkapi INKHttpSsn INKHttpTxnSsnGet(INKHttpTxn txnp);
-
-/* Call this before a write to the cache is done, else too late for 
- * current txn:  
- * INK_HTTP_READ_RESPONSE_HDR_HOOK. 
- * default: transformed copy written to cache 
- * on == non-zero,	cache_transformed = true (default)
- * on == zero,		cache_transformed = false
-*/
-inkapi void INKHttpTxnTransformedRespCache(INKHttpTxn txnp, int on);
-
-/* INK_HTTP_READ_RESPONSE_HOOK & INK_HTTP_RESPONSE_HDR_HOOK
- * Get the transform resp header from the HTTP transaction. 
- * re = 0 if dne, else 1.
-*/
-inkapi int INKHttpTxnTransformRespGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-
-/* Call this before a write to the cache is done, else too late for 
- * current txn:  
- * INK_HTTP_READ_RESPONSE_HDR_HOOK. 
- * default: un-transformed copy not written to cache
- * on == non-zero,	cache_untransformed = true
- * on == zero,		cache_untransformed = false (default)
-*/
-inkapi void INKHttpTxnUntransformedRespCache(INKHttpTxn txnp, int on);
-
-#endif
 
 static int
 handle_HTTP_SEND_RESPONSE_HDR(INKCont contp, INKEvent event, void *eData)
@@ -165,12 +57,6 @@ static int
 handle_READ_REQUEST_HDR(INKCont cont, INKEvent event, void *eData)
 {
   int err = 0;
-#if 0
-/* Non-cached, 
- * get client req after recieving INK_HTTP_READ_REQUEST_HDR_HOOK 
-*/
-  inkapi int INKHttpTxnClientReqGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-#endif
   return err;
 }
 
@@ -178,12 +64,6 @@ static int
 handle_READ_RESPONSE_HDR(INKCont contp, INKEvent event, void *eData)
 {
   int err = 0;
-#if 0
-  /* Non-cached, 
-   * get "client" resp after recieving INK_HTTP_READ_RESPONSE_HDR_HOOK 
-   */
-  inkapi int INKHttpTxnClientRespGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-#endif
   return err;
 }
 

Modified: trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTxnHookAdd.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTxnHookAdd.c?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTxnHookAdd.c (original)
+++ trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTxnHookAdd.c Thu May  6 23:40:41 2010
@@ -139,14 +139,6 @@ INKHttpHook(INKCont contp, INKEvent even
 
     /* session level event with the session */
     INKHttpSsnHookAdd(ssnp, INK_HTTP_SSN_CLOSE_HOOK, contp);
-#if 0
-    /* INK_HTTP_TXN_CLOSE_HOOK will not be delivered if registered 
-     *  here since the hook id lives in the session and the 
-     *  transaction is deleted before the session.  Register the
-     *  the event at TXN_START, event will live in the txn.
-     */
-    INKHttpSsnHookAdd(ssnp, INK_HTTP_TXN_CLOSE_HOOK, contp);
-#endif
     INKHttpSsnReenable(ssnp, INK_EVENT_HTTP_CONTINUE);
     break;
 

Modified: trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTxnIPAddress.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTxnIPAddress.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTxnIPAddress.cc (original)
+++ trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTxnIPAddress.cc Thu May  6 23:40:41 2010
@@ -31,56 +31,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#if 0
-/* HTTP transactions 
- * 
- * TODO call each interface at each event:
- * 1. where the call is not applicable, the interface should
- *    return error value. Currently, only calling where apparently 
- *    applicable.
- *
- * 2. where call is applicable, process results  
- *    Code lacks organization, its partly due to not knowing
- *    where interfaces can be called from. In some cases a 
- *    was left in even though it may not be the correct event 
- *    to call from.  
- * 
- * 3. Current approach is to only report when an error
- *    occurs. This allows quick development of test code.
- *    No news is good news. Add more reporting 
- *    support that can be configurable. 
- *
- * 4. Uh, yes. This is a "C++" plug-in but you'd never
- *    know the difference from C. We need to leverage
- *    OO principles.
- * 
- * 5. Run this under stress/load tests.
- * 
-*/
-
-/* Call as soon as we have a transaction: INK_HTTP_TXN_START
- * Client port 
-*/
-inkapi int INKHttpTxnClientIncomingPortGet(INKHttpTxn txnp);
-/* Call as soon as we have a transaction: INK_HTTP_TXN_START
-/* Client IP for a transaction (not incoming) */
-inkapi unsigned int INKHttpTxnClientIPGet(INKHttpTxn txnp);
-/* Origin Server (destination) or Parent IP 
-*/
-inkapi unsigned int INKHttpTxnNextHopIPGet(INKHttpTxn txnp);
-/* Results if parent proxy not enabled, results if parent proxy is enabled
-*/
-inkapi void INKHttpTxnParentProxyGet(INKHttpTxn txnp, char **hostname, int *port);
-/* hostname is copied into the txn and is deletable upon return
-*/
-inkapi void INKHttpTxnParentProxySet(INKHttpTxn txnp, char *hostname, int port);
-/* 
- * Origin Server IP
- * DETAILS: zero before INK_HTTP_OS_DNS_HOOK 
- *          IP addr after INK_HTTP_OS_DNS_HOOK 
-*/
-inkapi unsigned int INKHttpTxnServerIPGet(INKHttpTxn txnp);
-#endif
 
 /* cvrt unsigned int address to dotted decimal address  
  * delete on the otherside, otherwise: don't care

Modified: trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTxnServer.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTxnServer.c?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTxnServer.c (original)
+++ trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKHttpTxnServer.c Thu May  6 23:40:41 2010
@@ -24,29 +24,6 @@
 
 #include "ts.h"
 
-#if 0
-
-/* HTTP transactions */
-
-/* Need a transaction and a request: earliest point is 
- * not INK_HTTP_TXN_START_HOOK but INK_HTTP_READ_REQUEST_HDR_HOOK
- * process the request.
-*/
-inkapi int INKHttpTxnServerReqGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-
-/* Need a transaction and a server response: earliest point is 
- * INK_HTTP_READ_RESPONSE_HDR_HOOK, then process the response. 
-*/
-inkapi int INKHttpTxnServerRespGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-
-
-/* Call this as soon as a transaction has been created and retrieve the session
- * and do some processing.
-*/
-inkapi INKHttpSsn INKHttpTxnSsnGet(INKHttpTxn txnp);
-
-Delayed due to:INKqa08306.
-#endif
 const char *const INKEventStrId[] = {
   "INK_EVENT_HTTP_CONTINUE",    /* 60000 */
   "INK_EVENT_HTTP_ERROR",       /* 60001 */
@@ -99,18 +76,6 @@ DisplayBufferContents(INKMBuffer bufp, I
   }
   reader = INKIOBufferReaderAlloc(output_buffer);
 
-#if 0
-  /* Should not need the txnp to read the reqHdr/respHdr */
-
-  /* originally, just got the request */
-  if ((type == INK_HTTP_TYPE_REQUEST) && (!INKHttpTxnClientReqGet(txnp, &bufp, &hdr_loc))) {
-    INKError("couldn't retrieve client request header\n");
-    return;
-  } else if ((type == INK_HTTP_TYPE_RESPONSE) && (!INKHttpTxnClientRespGet(txnp, &bufp, &hdr_loc))) {
-    INKError("couldn't retrieve client request header\n");
-    return;
-  }
-#endif
 
     /****** Print the HTTP header (for either a resp or req) first ********/
   INKHttpHdrPrint(bufp, hdr_loc, output_buffer);
@@ -188,28 +153,6 @@ handle_HTTP_SEND_RESPONSE_HDR(INKCont co
 
   int re = 0, err = 0;
 
-#if 0
-/* INKqa08306 */
-  re = INKHttpTxnCachedReqGet(txnp, &reqBuf, &reqBufLoc);
-  if (re) {
-    /* Display all buffer contents */
-    /* TODO compare with a known value */
-    DisplayBufferContents(respBuf, respBufLoc, INK_HTTP_TYPE_REQUEST);
-  } else {
-    INKDebug("INKHttpTransaction", "INKHttpTxnCachedReqGet(): Failed.");
-    err++;
-  }
-
-  re = INKHttpTxnCachedRespGet(txnp, &respBuf, &respBufLoc);
-  if (re) {
-    /* Display buffer contents */
-    /* TODO compare with a known value */
-    DisplayBufferContents(respBuf, respBufLoc, INK_HTTP_TYPE_RESPONSE);
-  } else {
-    INKDebug("INKHttpTransaction", "INKHttpTxnCachedRespGet(): Failed.");
-    err++;
-  }
-#endif
   return err;
 }
 

Modified: trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKProto.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKProto.c?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKProto.c (original)
+++ trafficserver/traffic/trunk/test/plugin/INKHttpHooksTrans/INKProto.c Thu May  6 23:40:41 2010
@@ -24,100 +24,6 @@
 
 #include "ts.h"
 
-#if 0
-/* HTTP transactions */
-
-/* Cached, get as soon as a transaction is available.
-*/
-inkapi int INKHttpTxnCachedReqGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-/* Cached, get as soon as a transaction is available.
-*/
-inkapi int INKHttpTxnCachedRespGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-
-/* Client port */
-inkapi int INKHttpTxnClientIncomingPortGet(INKHttpTxn txnp);
-
-/* Client IP for a transaction (not incoming) */
-inkapi unsigned int INKHttpTxnClientIPGet(INKHttpTxn txnp);
-
-/* Non-cached, 
- * get client req after recieving INK_HTTP_READ_REQUEST_HDR_HOOK 
-*/
-inkapi int INKHttpTxnClientReqGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-/* Non-cached, 
- * get "client" req after recieving INK_HTTP_READ_RESPONSE_HDR_HOOK 
-*/
-inkapi int INKHttpTxnClientRespGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-
-/* This is a response to a client (req), which will be executed after reciept
- * of: 
- *   1. INK_HTTP_OS_DNS_HOOK fails for some reason to do the translation
- *   2. INK_HTTP_READ_RESPONSE_HDR_HOOK origin server replied with some 
- *      type of error. 
- *   3. An error is possible at any point in HTTP processing.
-*/
-inkapi void INKHttpTxnErrorBodySet(INKHttpTxn txnp, char *buf, int buflength, char *mimetype);
-
-/* DONE */
-inkapi void INKHttpTxnHookAdd(INKHttpTxn txnp, INKHttpHookID id, INKCont contp);
-
-/* Origin Server (destination) or Parent IP */
-inkapi unsigned int INKHttpTxnNextHopIPGet(INKHttpTxn txnp);
-
-/* Results if parent proxy not enabled, results if parent proxy is enabled
-*/
-inkapi void INKHttpTxnParentProxyGet(INKHttpTxn txnp, char **hostname, int *port);
-
-inkapi void INKHttpTxnParentProxySet(INKHttpTxn txnp, char *hostname, int port);
-
-/*  */
-inkapi void INKHttpTxnReenable(INKHttpTxn txnp, INKEvent event);
-
-/* Origin Server IP */
-inkapi unsigned int INKHttpTxnServerIPGet(INKHttpTxn txnp);
-
-/* Need a transaction and a request: earliest point is 
- * not INK_HTTP_TXN_START_HOOK but INK_HTTP_READ_REQUEST_HDR_HOOK
- * process the request.
-*/
-inkapi int INKHttpTxnServerReqGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-
-/* Need a transaction and a server response: earliest point is 
- * INK_HTTP_READ_RESPONSE_HDR_HOOK, then process the response. 
-*/
-inkapi int INKHttpTxnServerRespGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-
-
-/* Call this as soon as a transaction has been created and retrieve the session
- * and do some processing.
-*/
-inkapi INKHttpSsn INKHttpTxnSsnGet(INKHttpTxn txnp);
-
-/* Call this before a write to the cache is done, else too late for 
- * current txn:  
- * INK_HTTP_READ_RESPONSE_HDR_HOOK. 
- * default: transformed copy written to cache 
- * on == non-zero,	cache_transformed = true (default)
- * on == zero,		cache_transformed = false
-*/
-inkapi void INKHttpTxnTransformedRespCache(INKHttpTxn txnp, int on);
-
-/* INK_HTTP_READ_RESPONSE_HOOK & INK_HTTP_RESPONSE_HDR_HOOK
- * Get the transform resp header from the HTTP transaction. 
- * re = 0 if dne, else 1.
-*/
-inkapi int INKHttpTxnTransformRespGet(INKHttpTxn txnp, INKMBuffer * bufp, INKMLoc * offset);
-
-/* Call this before a write to the cache is done, else too late for 
- * current txn:  
- * INK_HTTP_READ_RESPONSE_HDR_HOOK. 
- * default: un-transformed copy not written to cache
- * on == non-zero,	cache_untransformed = true
- * on == zero,		cache_untransformed = false (default)
-*/
-inkapi void INKHttpTxnUntransformedRespCache(INKHttpTxn txnp, int on);
-
-#endif
 
 /* Run prototype code in this small plug-in. Then place this
  * code into it's own section.

Modified: trafficserver/traffic/trunk/test/plugin/check-http/check-http-0.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/check-http/check-http-0.c?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/check-http/check-http-0.c (original)
+++ trafficserver/traffic/trunk/test/plugin/check-http/check-http-0.c Thu May  6 23:40:41 2010
@@ -948,11 +948,6 @@ handleReadRequest(INKCont pCont, INKHttp
 
   HdrInfo_T *pReqHdrInfo = NULL, *pNewReqHdrInfo = NULL;
 
-#if 0
-  const char *constant_request_header_str =
-    "GET http://www.joes-hardware.com/ HTTP/1.0\r\nDate: Wed, 05 Jul 2000 22:12:26 GMT\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.51 [en] (X11; U; IRIX 6.2 IP22)\r\nHost: www.joes-hardware.com\r\nCache-Control: no-cache\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Charset: iso-8859-1,*,utf-8\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nX-Number-Header: 12345\r\nX-Silly-Header: frobnichek grobbledegook\r\nAccept-Charset: windows-1250, koi8-r\r\nX-Silly-Header: wawaaa\r\n\r\n";
-
-#endif
 
 
   pReqHdrInfo = initHdr();

Modified: trafficserver/traffic/trunk/test/plugin/check-mime/check-mime-0.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/check-mime/check-mime-0.c?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/check-mime/check-mime-0.c (original)
+++ trafficserver/traffic/trunk/test/plugin/check-mime/check-mime-0.c Thu May  6 23:40:41 2010
@@ -750,51 +750,6 @@ sectionMimeHdr(INKMBuffer hdrBuf, INKMLo
      * name and values)
      * -----------------------------------------------------------------------*/
 
-#if 0
-    /* DEPRECATED: ** do not use section 6.1 ** 
-     * INKMimeHdrFieldInsert w/ idx == 0 and hence the Functionality to 
-     * "pre-pend" a MIME field is deprecated starting bobcat */
-
-                /*** (6.1): prepend a MIME field ******/
-    /* Create a MIME field */
-    if ((newFieldLoc = INKMimeHdrFieldCreate(tmpBuf, tmpMimeHdrLoc)) == INK_ERROR_PTR) {
-      LOG_API_ERROR_COMMENT("INKMimeHdrFieldCreate", "Skip to section 6.2");
-      goto section_62;
-    } else if (INKMimeHdrFieldNameSet(tmpBuf, tmpMimeHdrLoc, newFieldLoc, "Prepend-Field",
-                                      strlen("Prepend-Field") == INK_ERROR)) {
-      LOG_API_ERROR("INKMimeHdrFieldNameSet");
-    } else if (INKMimeHdrFieldValueInsert(tmpBuf, tmpMimeHdrLoc, newFieldLoc, "prepend-field-value-1",
-                                          strlen("prepend-field-value-1"), -1) == INK_ERROR) {
-      LOG_API_ERROR("INKMimeHdrFieldValueInsert");
-    }
-
-    /* Now, do the insert : prepend it to the list of fields */
-    if (INKMimeHdrFieldInsert(tmpBuf, tmpMimeHdrLoc, newFieldLoc, 0) == INK_ERROR) {
-      LOG_API_ERROR("INKMimeHdrFieldInsert");
-    }
-
-    /* auto: check the pre-pended field */
-    if ((tmpFieldLoc = INKMimeHdrFieldGet(tmpBuf, tmpMimeHdrLoc, 0)) == INK_ERROR_PTR) {
-      LOG_API_ERROR("INKMimeHdrFieldGet");
-    } else if (!tmpFieldLoc) {
-      LOG_AUTO_ERROR("INKMimeHdrFieldInsert", "Cannot INK_Get the newly inserted field");
-    } else {
-      if ((tmpFieldName = INKMimeHdrFieldNameGet(tmpBuf, tmpMimeHdrLoc, tmpFieldLoc,
-                                                 &tmpFieldNameLength)) == INK_ERROR_PTR) {
-        LOG_API_ERROR("INKMimeHdrFieldNameGet");
-      } else {
-        if (strncmp(tmpFieldName, "Prepend-Field", strlen("Prepend-Field"))) {
-          LOG_AUTO_ERROR("INKMimeHdrFieldInsert", "New field not pre-pended! - INKqa8057");
-        }
-        STR_RELEASE(tmpBuf, tmpMimeHdrLoc, tmpFieldName);
-      }
-      HANDLE_RELEASE(tmpBuf, tmpMimeHdrLoc, tmpFieldLoc);
-    }
-
-    printMimeFields(tmpBuf, tmpMimeHdrLoc, RESP, 6.1);
-
-  section_62:
-#endif
     INKDebug(RESP, "***********************( 6.2 )***********************");
 
         /*** (6.2): append some *field value* ******/
@@ -1288,36 +1243,6 @@ sectionMimeHdr(INKMBuffer hdrBuf, INKMLo
     STR_RELEASE(tmpBuf, tmpMimeHdrLoc, tmpFieldValue1);
     STR_RELEASE(tmpBuf, tmpMimeHdrLoc, tmpFieldValue2);
 
-#if 0
-    /* FIXME: Why the "auto:" case is failing here? */
-                /***** (13): play with INKMimeHdrFieldValueSet* *****/
-    currentTime = time(&currentTime);
-    INKMimeHdrFieldValueInsertDate(tmpBuf, tmpMimeHdrLoc, fieldLoc3, currentTime, -1);
-
-    /* set other values to the field */
-    valueInt = -2;
-    valueUint = 1;
-    INKMimeHdrFieldValueSetInt(tmpBuf, tmpMimeHdrLoc, fieldLoc3, 0, valueInt);
-    INKMimeHdrFieldValueSetUint(tmpBuf, tmpMimeHdrLoc, fieldLoc3, 1, valueUint);
-    INKMimeHdrFieldValueSetDate(tmpBuf, tmpMimeHdrLoc, fieldLoc3, 2, currentTime);
-    printDateDifference(tmpBuf, tmpMimeHdrLoc, MY_TEST_HDR_3, currentTime, RESP, 13);
-    printField(tmpBuf, tmpMimeHdrLoc, MY_TEST_HDR_3, RESP, 13);
-
-    /* auto: Get the field values again and check */
-    if (INKMimeHdrFieldValueGetInt(tmpBuf, tmpMimeHdrLoc, fieldLoc3, 0) != valueInt) {
-      LOG_AUTO_ERROR("INKMimeHdrFieldValueSetInt",
-                     "INKMimeHdrFieldValueGetInt different from INKMimeHdrFieldValueSetInt");
-    }
-    if (INKMimeHdrFieldValueGetUint(tmpBuf, tmpMimeHdrLoc, fieldLoc3, 1) != valueUint) {
-      LOG_AUTO_ERROR("INKMimeHdrFieldValueSetUint",
-                     "INKMimeHdrFieldValueGetUint different from INKMimeHdrFieldValueSetUint");
-    }
-    fieldTime = INKMimeHdrFieldValueGetDate(tmpBuf, tmpMimeHdrLoc, fieldLoc3, 2);
-    if (fieldTime != currentTime) {
-      LOG_AUTO_ERROR("INKMimeHdrFieldValueSetDate",
-                     "INKMimeHdrFieldValueGetDate different from INKMimeHdrFieldValueSetDate");
-    }
-#endif
 
         /***** (13): play with INKMimeHdrFieldValueSet* *****/
     currentTime = time(&currentTime);