26#include <openssl/evp.h>
135 && (((
c =
ctx->s[
ctx->i]) ==
' ') || (
c ==
'\t'))) {
138 return (
ctx->i <
ctx->slen);
144 for (j =
ctx->i; j <
ctx->slen; ++j) {
145 if (
ctx->s[j] ==
c) {
308 if (
s && (
s ==
val ||
s[-1] ==
' ')) {
310 if (!*
s || *
s ==
' ') {
341 switch (
ctx->push_policy) {
352 ctx->req->authority,
path, headers);
435#if AP_HAS_RESPONSE_BUCKETS
461 ctx.push_policy = push_policy;
475#define GCSLOG_LEVEL APLOG_TRACE1
508 for (
i = 0;
i !=
len; ++
i)
525#if APR_UINT64_MAX > UINT_MAX
539 if (
n <= 2)
return 2;
558 diary->
N = diary->
NMax;
599 if (
e->hash ==
hash) {
660 for (
i = 0;
i < pushes->
nelts; ++
i) {
669 "push_diary_update: already there PUSH %s",
push->req->path);
675 "push_diary_update: adding PUSH %s",
push->req->path);
687#if AP_HAS_RESPONSE_BUCKETS
787 for (
i =
encoder->fixed_bits-1;
i >= 0; --
i) {
807 int maxP,
const char *authority,
846 "h2_push_diary_digest_get: %d entries, N=%d, log2n=%d, "
847 "mask_bits=%d, enc.mask_bits=%d, delta_bits=%d, enc.log2p=%d, authority=%s",
850 (
int)
encoder.log2p, authority);
869 "h2_push_diary_digest_get: golomb compressed hashes, %d bytes",
const char apr_size_t len
APR general purpose library routines.
request_rec int int apr_table_t const char * path
const char server_rec server_rec ** ps
apr_brigade_flush void * ctx
apr_pool_t apr_dbd_t apr_dbd_results_t ** res
apr_datum_t apr_datum_t * pvalue
const char apr_ssize_t slen
#define APR_URI_UNP_OMITSITEPART
int ap_cstr_casecmp(const char *s1, const char *s2)
#define ap_strstr_c(s, c)
const char int apr_pool_t * pool
apr_vformatter_buff_t * c
apr_uint32_t apr_pool_t apr_uint32_t apr_pollset_method_e method
#define apr_pcalloc(p, size)
#define APR_ARRAY_PUSH(ary, type)
#define APR_ARRAY_IDX(ary, i, type)
#define H2_HD_MATCH_LIT(l, name, nlen)
static int add_push(link_ctx *ctx)
apr_array_header_t * h2_push_collect(apr_pool_t *p, const struct h2_request *req, apr_uint32_t push_policy, const struct h2_headers *res)
static apr_int32_t ceil_power_of_2(apr_int32_t n)
static int skip_ws(link_ctx *ctx)
static int read_link(link_ctx *ctx)
apr_array_header_t * h2_push_collect_update(struct h2_stream *stream, const struct h2_request *req, const struct h2_headers *res)
static int read_chr(link_ctx *ctx, char c)
static int same_authority(const h2_request *req, const apr_uri_t *uri)
static int read_param(link_ctx *ctx)
static apr_status_t gset_encode_bit(gset_encoder *encoder, int bit)
static int read_qstring(link_ctx *ctx, const char **ps)
static void remove_first(h2_push_diary *diary)
static unsigned int val_apr_hash(const char *str)
static int attr_char(char c)
static void move_to_last(h2_push_diary *diary, apr_size_t idx)
apr_status_t h2_push_diary_digest_get(h2_push_diary *diary, apr_pool_t *pool, int maxP, const char *authority, const char **pdata, apr_size_t *plen)
static int find_chr(link_ctx *ctx, char c, size_t *pidx)
static void inspect_link(link_ctx *ctx, const char *s, size_t slen)
static int set_push_header(void *ctx, const char *key, const char *value)
static int h2_push_diary_find(h2_push_diary *diary, apr_uint64_t hash)
static void h2_push_diary_append(h2_push_diary *diary, h2_push_diary_entry *e)
static int read_pname(link_ctx *ctx, const char **pname)
static int has_param(link_ctx *ctx, const char *param)
static int has_relation(link_ctx *ctx, const char *rel)
static int read_sep(link_ctx *ctx)
static char * mk_str(link_ctx *ctx, size_t end)
apr_array_header_t * h2_push_diary_update(h2_session *session, apr_array_header_t *pushes)
static void calc_apr_hash(h2_push_diary *diary, apr_uint64_t *phash, h2_push *push)
static unsigned char cbit_mask[]
h2_push_diary * h2_push_diary_create(apr_pool_t *p, int N)
static int head_iter(void *ctx, const char *key, const char *value)
static apr_status_t gset_encode_next(gset_encoder *encoder, apr_uint64_t pval)
static int ptoken_char(char c)
static const char * policy_str(h2_push_policy policy)
static void init_params(link_ctx *ctx)
static int read_ptoken(link_ctx *ctx, const char **ps)
static int read_pvalue(link_ctx *ctx, const char **pvalue)
static h2_push_diary * diary_create(apr_pool_t *p, h2_push_digest_type dtype, int N)
static int cmp_puint64(const void *p1, const void *p2)
@ H2_PUSH_DIGEST_APR_HASH
h2_request * h2_request_create(int id, apr_pool_t *pool, const char *method, const char *scheme, const char *authority, const char *path, apr_table_t *header)
apr_status_t h2_request_end_headers(h2_request *req, apr_pool_t *pool, size_t raw_bytes)
unsigned char h2_log2(int n)
h2_push_digest_type dtype
h2_push_digest_calc * dcalc
apr_array_header_t * entries
struct h2_push_diary * push_diary
struct h2_session * session
apr_array_header_t * pushes