Data Structures | Defines | Typedefs | Enumerations | Functions

HttpTransact.h File Reference

A brief file description. More...

#include "libts.h"
#include "P_HostDB.h"
#include "P_Net.h"
#include "HttpConfig.h"
#include "HTTP.h"
#include "HttpTransactCache.h"
#include "StatSystem.h"
#include "ControlMatcher.h"
#include "CacheControl.h"
#include "ParentSelection.h"
#include "ProxyConfig.h"
#include "Transform.h"
#include "api/ts/remap.h"
#include "RemapPluginInfo.h"
#include "UrlMapping.h"
#include <records/I_RecHttp.h>
#include "congest/Congestion.h"
#include "InkErrno.h"
Include dependency graph for HttpTransact.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _HttpApiInfo
class  HttpTransact
struct  HttpTransact::StatRecord_t
struct  HttpTransact::StatBlock
struct  HttpTransact::_CacheDirectives
struct  HttpTransact::_CacheLookupInfo
struct  HttpTransact::_RedirectInfo
struct  HttpTransact::ConnectionAttributes
struct  HttpTransact::_CurrentInfo
struct  HttpTransact::_DNSLookupInfo
struct  HttpTransact::_HeaderInfo
struct  HttpTransact::_SquidLogInfo
struct  HttpTransact::State

Defines

#define MAX_DNS_LOOKUPS   2
#define NUM_SECONDS_IN_ONE_YEAR   (31536000)
#define HTTP_RELEASE_ASSERT(X)   ink_release_assert(X)
#define ACQUIRE_PRINT_LOCK()
#define RELEASE_PRINT_LOCK()
#define DUMP_HEADER(T, H, I, S)
#define TRANSACT_SETUP_RETURN(n, r)
#define TRANSACT_RETURN(n, r)
#define TRANSACT_RETURN_VAL(n, r, v)
#define SET_UNPREPARE_CACHE_ACTION(C)
#define UNKNOWN_INTERNAL_ERROR   (INK_START_ERRNO - 1)
#define SET_VIA_STRING(I, S)   s->via_string[I]=S;
#define GET_VIA_STRING(I)   (s->via_string[I])
#define StatBlockEntries   28
#define HTTP_TRANSACT_STATE_MAX_XBUF_SIZE   (1024*2)

Typedefs

typedef time_t ink_time_t
typedef struct _HttpApiInfo HttpApiInfo
typedef void(* TransactEntryFunc_t )(HttpTransact::State *s)

Enumerations

enum  ViaStringIndex_t {
  VIA_CLIENT = 0, VIA_CLIENT_REQUEST, VIA_CACHE, VIA_CACHE_RESULT,
  VIA_SERVER, VIA_SERVER_RESULT, VIA_CACHE_FILL, VIA_CACHE_FILL_ACTION,
  VIA_PROXY, VIA_PROXY_RESULT, VIA_ERROR, VIA_ERROR_TYPE,
  VIA_DETAIL_SEPARATOR, VIA_DETAIL_TUNNEL_DESCRIPTOR, VIA_DETAIL_TUNNEL, VIA_DETAIL_CACHE_DESCRIPTOR,
  VIA_DETAIL_CACHE_TYPE, VIA_DETAIL_CACHE_LOOKUP, VIA_DETAIL_ICP_DESCRIPTOR, VIA_DETAIL_ICP_CONNECT,
  VIA_DETAIL_PP_DESCRIPTOR, VIA_DETAIL_PP_CONNECT, VIA_DETAIL_SERVER_DESCRIPTOR, VIA_DETAIL_SERVER_CONNECT,
  MAX_VIA_INDICES
}
enum  ViaString_t {
  VIA_CLIENT_STRING = 'u', VIA_CLIENT_ERROR = 'E', VIA_CLIENT_IMS = 'I', VIA_CLIENT_NO_CACHE = 'N',
  VIA_CLIENT_COOKIE = 'C', VIA_CLIENT_SIMPLE = 'S', VIA_CACHE_STRING = 'c', VIA_CACHE_MISS = 'M',
  VIA_IN_CACHE_NOT_ACCEPTABLE = 'A', VIA_IN_CACHE_STALE = 'S', VIA_IN_CACHE_FRESH = 'H', VIA_IN_RAM_CACHE_FRESH = 'R',
  VIA_SERVER_STRING = 's', VIA_SERVER_ERROR = 'E', VIA_SERVER_NOT_MODIFIED = 'N', VIA_SERVER_SERVED = 'S',
  VIA_CACHE_FILL_STRING = 'f', VIA_CACHE_DELETED = 'D', VIA_CACHE_WRITTEN = 'W', VIA_CACHE_UPDATED = 'U',
  VIA_PROXY_STRING = 'p', VIA_PROXY_NOT_MODIFIED = 'N', VIA_PROXY_SERVED = 'S', VIA_PROXY_SERVER_REVALIDATED = 'R',
  VIA_ERROR_STRING = 'e', VIA_ERROR_NO_ERROR = 'N', VIA_ERROR_AUTHORIZATION = 'A', VIA_ERROR_CONNECTION = 'C',
  VIA_ERROR_DNS_FAILURE = 'D', VIA_ERROR_FORBIDDEN = 'F', VIA_ERROR_HEADER_SYNTAX = 'H', VIA_ERROR_SERVER = 'S',
  VIA_ERROR_TIMEOUT = 'T', VIA_ERROR_CACHE_READ = 'R', VIA_DETAIL_SEPARATOR_STRING = ':', VIA_DETAIL_TUNNEL_DESCRIPTOR_STRING = 't',
  VIA_DETAIL_TUNNEL_HEADER_FIELD = 'F', VIA_DETAIL_TUNNEL_METHOD = 'M', VIA_DETAIL_TUNNEL_CACHE_OFF = 'O', VIA_DETAIL_TUNNEL_URL = 'U',
  VIA_DETAIL_TUNNEL_NO_FORWARD = 'N', VIA_DETAIL_TUNNEL_AUTHORIZATION = 'A', VIA_DETAIL_CACHE_DESCRIPTOR_STRING = 'c', VIA_DETAIL_CACHE = 'C',
  VIA_DETAIL_CLUSTER = 'L', VIA_DETAIL_ICP = 'I', VIA_DETAIL_PARENT = 'P', VIA_DETAIL_SERVER = 'S',
  VIA_DETAIL_HIT_CONDITIONAL = 'N', VIA_DETAIL_HIT_SERVED = 'H', VIA_DETAIL_MISS_CONDITIONAL = 'I', VIA_DETAIL_MISS_NOT_CACHED = 'M',
  VIA_DETAIL_MISS_EXPIRED = 'S', VIA_DETAIL_MISS_CONFIG = 'C', VIA_DETAIL_MISS_CLIENT = 'U', VIA_DETAIL_MISS_METHOD = 'D',
  VIA_DETAIL_MISS_COOKIE = 'K', VIA_DETAIL_ICP_DESCRIPTOR_STRING = 'i', VIA_DETAIL_ICP_SUCCESS = 'S', VIA_DETAIL_ICP_FAILURE = 'F',
  VIA_DETAIL_PP_DESCRIPTOR_STRING = 'p', VIA_DETAIL_PP_SUCCESS = 'S', VIA_DETAIL_PP_FAILURE = 'F', VIA_DETAIL_SERVER_DESCRIPTOR_STRING = 's',
  VIA_DETAIL_SERVER_SUCCESS = 'S', VIA_DETAIL_SERVER_FAILURE = 'F'
}
enum  { HTTP_UNDEFINED_CL = -1 }

Functions

bool is_response_body_precluded (HTTPStatus status_code, int method)
inkcoreapi ink_time_t ink_cluster_time (void)

Detailed Description

A brief file description.

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.

Definition in file HttpTransact.h.


Define Documentation

#define ACQUIRE_PRINT_LOCK (  ) 

Definition at line 54 of file HttpTransact.h.

Referenced by HttpTransactCache::SelectFromAlternates().

#define DUMP_HEADER (   T,
  H,
  I,
  S 
)
Value:
{ \
    if (diags->on(T)) { \
    ACQUIRE_PRINT_LOCK() \
    fprintf(stderr, "+++++++++ %s +++++++++\n", S); \
    fprintf(stderr, "-- State Machine Id: %" PRId64 "\n", I); \
        char b[4096]; \
        int used, tmp, offset; \
        int done; \
        offset = 0; \
    if ((H)->valid()) { \
          do { \
              used = 0; \
              tmp = offset; \
              done = (H)->print (b, 4095, &used, &tmp); \
              offset += used; \
              b[used] = '\0'; \
              fprintf (stderr, "%s", b); \
          } while (!done); \
        } \
    RELEASE_PRINT_LOCK() \
    } \
}

Definition at line 57 of file HttpTransact.h.

Referenced by HttpTransact::build_request(), HttpTransact::build_response(), HttpTransact::build_response_copy(), check_n_attach_prefetch_transform(), HttpTransact::handle_cache_operation_on_forward_server_response(), HttpTransact::handle_transform_ready(), PrefetchBlaster::handleCookieHeaders(), HttpTransact::HandlePushResponseHdr(), HttpTransact::HandleRequest(), HttpTransact::HandleResponse(), PrefetchBlaster::init(), HttpTransact::issue_revalidate(), HttpSM::redirect_request(), HttpTransact::set_header_for_transform(), HttpTransact::set_headers_for_cache_write(), and HttpSM::setup_server_send_request().

#define GET_VIA_STRING (   I  )     (s->via_string[I])
#define HTTP_RELEASE_ASSERT (   X  )     ink_release_assert(X)
#define HTTP_TRANSACT_STATE_MAX_XBUF_SIZE   (1024*2)

Definition at line 851 of file HttpTransact.h.

#define MAX_DNS_LOOKUPS   2

Definition at line 48 of file HttpTransact.h.

#define NUM_SECONDS_IN_ONE_YEAR   (31536000)
#define RELEASE_PRINT_LOCK (  ) 

Definition at line 55 of file HttpTransact.h.

Referenced by HttpTransactCache::SelectFromAlternates().

#define SET_UNPREPARE_CACHE_ACTION (   C  ) 
Value:
{ \
    if (C.action == HttpTransact::CACHE_PREPARE_TO_DELETE) { \
    C.action = HttpTransact::CACHE_DO_DELETE; \
    } else if (C.action == HttpTransact::CACHE_PREPARE_TO_UPDATE) { \
    C.action = HttpTransact::CACHE_DO_UPDATE; \
    } else { \
    C.action = HttpTransact::CACHE_DO_WRITE; \
    } \
}

Definition at line 96 of file HttpTransact.h.

Referenced by HttpTransact::handle_cache_write_lock().

#define SET_VIA_STRING (   I,
  S 
)    s->via_string[I]=S;
#define StatBlockEntries   28

Definition at line 585 of file HttpTransact.h.

Referenced by HttpTransact::add_new_stat_block(), and HttpTransact::update_stat().

#define TRANSACT_RETURN (   n,
  r 
)
Value:
TRANSACT_SETUP_RETURN(n, r) \
return; \

Definition at line 87 of file HttpTransact.h.

Referenced by HttpTransact::BadRequest(), HttpTransact::build_response_from_cache(), HttpTransact::CallOSDNSLookup(), HttpTransact::DecideCacheLookup(), HttpTransact::delete_server_rr_entry(), HttpTransact::EndRemapRequest(), HttpTransact::handle_100_continue_response(), HttpTransact::handle_cache_write_lock(), HttpTransact::handle_parent_died(), HttpTransact::handle_response_from_icp_suggested_host(), HttpTransact::handle_response_from_parent(), HttpTransact::handle_response_from_server(), HttpTransact::handle_transform_cache_write(), HttpTransact::handle_transform_ready(), HttpTransact::handle_websocket_upgrade_post_remap(), HttpTransact::handle_websocket_upgrade_pre_remap(), HttpTransact::HandleApiErrorJump(), HttpTransact::HandleBlindTunnel(), HttpTransact::HandleCacheOpenRead(), HttpTransact::HandleCacheOpenReadHit(), HttpTransact::HandleCacheOpenReadHitFreshness(), HttpTransact::HandleCacheOpenReadMiss(), HttpTransact::HandleCacheOpenReadPush(), HttpTransact::HandleFiltering(), HttpTransact::HandleICPLookup(), HttpTransact::HandlePushCacheWrite(), HttpTransact::HandlePushResponseHdr(), HttpTransact::HandlePushTunnelSuccess(), HttpTransact::HandleRequest(), HttpTransact::HandleRequestAuthorized(), HttpTransact::HandleUpdateCachedObject(), HttpTransact::LookupSkipOpenServer(), HttpTransact::ModifyRequest(), HttpTransact::OSDNSLookup(), HttpTransact::PerformRemap(), HttpTransact::PPDNSLookup(), HttpTransact::setup_plugin_request_intercept(), and HttpTransact::StartRemapRequest().

#define TRANSACT_RETURN_VAL (   n,
  r,
  v 
)
Value:
TRANSACT_SETUP_RETURN(n, r) \
return v; \

Definition at line 91 of file HttpTransact.h.

Referenced by HttpTransact::handle_upgrade_request().

#define TRANSACT_SETUP_RETURN (   n,
  r 
)
Value:
s->next_action = n; \
s->transact_return_point = r; \
DebugSpecific((s->state_machine && s->state_machine->debug_on), "http_trans", "Next action %s; %s", #n, #r); \

Definition at line 82 of file HttpTransact.h.

#define UNKNOWN_INTERNAL_ERROR   (INK_START_ERRNO - 1)

Definition at line 114 of file HttpTransact.h.

Referenced by HttpTransact::get_error_string().


Typedef Documentation

typedef struct _HttpApiInfo HttpApiInfo
typedef time_t ink_time_t

Definition at line 107 of file HttpTransact.h.

Definition at line 1385 of file HttpTransact.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
HTTP_UNDEFINED_CL 

Definition at line 252 of file HttpTransact.h.

Enumerator:
VIA_CLIENT_STRING 
VIA_CLIENT_ERROR 
VIA_CLIENT_IMS 
VIA_CLIENT_NO_CACHE 
VIA_CLIENT_COOKIE 
VIA_CLIENT_SIMPLE 
VIA_CACHE_STRING 
VIA_CACHE_MISS 
VIA_IN_CACHE_NOT_ACCEPTABLE 
VIA_IN_CACHE_STALE 
VIA_IN_CACHE_FRESH 
VIA_IN_RAM_CACHE_FRESH 
VIA_SERVER_STRING 
VIA_SERVER_ERROR 
VIA_SERVER_NOT_MODIFIED 
VIA_SERVER_SERVED 
VIA_CACHE_FILL_STRING 
VIA_CACHE_DELETED 
VIA_CACHE_WRITTEN 
VIA_CACHE_UPDATED 
VIA_PROXY_STRING 
VIA_PROXY_NOT_MODIFIED 
VIA_PROXY_SERVED 
VIA_PROXY_SERVER_REVALIDATED 
VIA_ERROR_STRING 
VIA_ERROR_NO_ERROR 
VIA_ERROR_AUTHORIZATION 
VIA_ERROR_CONNECTION 
VIA_ERROR_DNS_FAILURE 
VIA_ERROR_FORBIDDEN 
VIA_ERROR_HEADER_SYNTAX 
VIA_ERROR_SERVER 
VIA_ERROR_TIMEOUT 
VIA_ERROR_CACHE_READ 
VIA_DETAIL_SEPARATOR_STRING 
VIA_DETAIL_TUNNEL_DESCRIPTOR_STRING 
VIA_DETAIL_TUNNEL_HEADER_FIELD 
VIA_DETAIL_TUNNEL_METHOD 
VIA_DETAIL_TUNNEL_CACHE_OFF 
VIA_DETAIL_TUNNEL_URL 
VIA_DETAIL_TUNNEL_NO_FORWARD 
VIA_DETAIL_TUNNEL_AUTHORIZATION 
VIA_DETAIL_CACHE_DESCRIPTOR_STRING 
VIA_DETAIL_CACHE 
VIA_DETAIL_CLUSTER 
VIA_DETAIL_ICP 
VIA_DETAIL_PARENT 
VIA_DETAIL_SERVER 
VIA_DETAIL_HIT_CONDITIONAL 
VIA_DETAIL_HIT_SERVED 
VIA_DETAIL_MISS_CONDITIONAL 
VIA_DETAIL_MISS_NOT_CACHED 
VIA_DETAIL_MISS_EXPIRED 
VIA_DETAIL_MISS_CONFIG 
VIA_DETAIL_MISS_CLIENT 
VIA_DETAIL_MISS_METHOD 
VIA_DETAIL_MISS_COOKIE 
VIA_DETAIL_ICP_DESCRIPTOR_STRING 
VIA_DETAIL_ICP_SUCCESS 
VIA_DETAIL_ICP_FAILURE 
VIA_DETAIL_PP_DESCRIPTOR_STRING 
VIA_DETAIL_PP_SUCCESS 
VIA_DETAIL_PP_FAILURE 
VIA_DETAIL_SERVER_DESCRIPTOR_STRING 
VIA_DETAIL_SERVER_SUCCESS 
VIA_DETAIL_SERVER_FAILURE 

Definition at line 151 of file HttpTransact.h.

Enumerator:
VIA_CLIENT 
VIA_CLIENT_REQUEST 
VIA_CACHE 
VIA_CACHE_RESULT 
VIA_SERVER 
VIA_SERVER_RESULT 
VIA_CACHE_FILL 
VIA_CACHE_FILL_ACTION 
VIA_PROXY 
VIA_PROXY_RESULT 
VIA_ERROR 
VIA_ERROR_TYPE 
VIA_DETAIL_SEPARATOR 
VIA_DETAIL_TUNNEL_DESCRIPTOR 
VIA_DETAIL_TUNNEL 
VIA_DETAIL_CACHE_DESCRIPTOR 
VIA_DETAIL_CACHE_TYPE 
VIA_DETAIL_CACHE_LOOKUP 
VIA_DETAIL_ICP_DESCRIPTOR 
VIA_DETAIL_ICP_CONNECT 
VIA_DETAIL_PP_DESCRIPTOR 
VIA_DETAIL_PP_CONNECT 
VIA_DETAIL_SERVER_DESCRIPTOR 
VIA_DETAIL_SERVER_CONNECT 
MAX_VIA_INDICES 

Definition at line 116 of file HttpTransact.h.


Function Documentation

inkcoreapi ink_time_t ink_cluster_time ( void   ) 
bool is_response_body_precluded ( HTTPStatus  status_code,
int  method 
) [inline]