#include <assert.h>
#include <stdio.h>
#include <apr_lib.h>
#include <apr_strings.h>
#include <apr_hash.h>
#include <apr_time.h>
#include <httpd.h>
#include <http_core.h>
#include <http_log.h>
#include <http_protocol.h>
#include "h2_private.h"
#include "h2_protocol.h"
#include "h2_util.h"
#include "h2_push.h"
#include "h2_request.h"
#include "h2_session.h"
#include "h2_stream.h"
Go to the source code of this file.
|
| static const char * | policy_str (h2_push_policy policy) |
| |
| static int | attr_char (char c) |
| |
| static int | ptoken_char (char c) |
| |
| static int | skip_ws (link_ctx *ctx) |
| |
| static int | find_chr (link_ctx *ctx, char c, size_t *pidx) |
| |
| static int | read_chr (link_ctx *ctx, char c) |
| |
| static char * | mk_str (link_ctx *ctx, size_t end) |
| |
| static int | read_qstring (link_ctx *ctx, const char **ps) |
| |
| static int | read_ptoken (link_ctx *ctx, const char **ps) |
| |
| static int | read_link (link_ctx *ctx) |
| |
| static int | read_pname (link_ctx *ctx, const char **pname) |
| |
| static int | read_pvalue (link_ctx *ctx, const char **pvalue) |
| |
| static int | read_param (link_ctx *ctx) |
| |
| static int | read_sep (link_ctx *ctx) |
| |
| static void | init_params (link_ctx *ctx) |
| |
| static int | same_authority (const h2_request *req, const apr_uri_t *uri) |
| |
| static int | set_push_header (void *ctx, const char *key, const char *value) |
| |
| static int | has_param (link_ctx *ctx, const char *param) |
| |
| static int | has_relation (link_ctx *ctx, const char *rel) |
| |
| static int | add_push (link_ctx *ctx) |
| |
| static void | inspect_link (link_ctx *ctx, const char *s, size_t slen) |
| |
| static int | head_iter (void *ctx, const char *key, const char *value) |
| |
| 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 unsigned int | val_apr_hash (const char *str) |
| |
| static void | calc_apr_hash (h2_push_diary *diary, apr_uint64_t *phash, h2_push *push) |
| |
| static apr_int32_t | ceil_power_of_2 (apr_int32_t n) |
| |
| static h2_push_diary * | diary_create (apr_pool_t *p, h2_push_digest_type dtype, int N) |
| |
| h2_push_diary * | h2_push_diary_create (apr_pool_t *p, int N) |
| |
| static int | h2_push_diary_find (h2_push_diary *diary, apr_uint64_t hash) |
| |
| static void | move_to_last (h2_push_diary *diary, apr_size_t idx) |
| |
| static void | remove_first (h2_push_diary *diary) |
| |
| static void | h2_push_diary_append (h2_push_diary *diary, h2_push_diary_entry *e) |
| |
| apr_array_header_t * | h2_push_diary_update (h2_session *session, apr_array_header_t *pushes) |
| |
| apr_array_header_t * | h2_push_collect_update (struct h2_stream *stream, const struct h2_request *req, const struct h2_headers *res) |
| |
| static int | cmp_puint64 (const void *p1, const void *p2) |
| |
| static apr_status_t | gset_encode_bit (gset_encoder *encoder, int bit) |
| |
| static apr_status_t | gset_encode_next (gset_encoder *encoder, apr_uint64_t pval) |
| |
| 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) |
| |
◆ GCSLOG_LEVEL
◆ h2_push_diary_entry
◆ add_push()
◆ attr_char()
◆ calc_apr_hash()
◆ ceil_power_of_2()
◆ cmp_puint64()
◆ diary_create()
◆ find_chr()
◆ gset_encode_bit()
◆ gset_encode_next()
◆ h2_push_collect()
Determine the list of h2_push'es to send to the client on behalf of the given request/response pair.
- Parameters
-
| p | the pool to use |
| req | the requst from the client |
| res | the response from the server |
- Returns
- array of h2_push addresses or NULL
Definition at line 441 of file h2_push.c.
◆ h2_push_collect_update()
Collect pushes for the given request/response pair, enter them into the diary and return those pushes newly entered.
Definition at line 692 of file h2_push.c.
◆ h2_push_diary_append()
◆ h2_push_diary_create()
Create a new push diary for the given maximum number of entries.
- Parameters
-
| p | the pool to use |
| N | the max number of entries, rounded up to 2^x |
- Returns
- the created diary, might be NULL of max_entries is 0
Definition at line 585 of file h2_push.c.
◆ h2_push_diary_digest_get()
◆ h2_push_diary_find()
◆ h2_push_diary_update()
Filters the given pushes against the diary and returns only those pushes that were newly entered in the diary.
Definition at line 651 of file h2_push.c.
◆ has_param()
◆ has_relation()
◆ head_iter()
◆ init_params()
◆ inspect_link()
◆ mk_str()
◆ move_to_last()
◆ policy_str()
◆ ptoken_char()
◆ read_chr()
◆ read_link()
◆ read_param()
◆ read_pname()
◆ read_ptoken()
◆ read_pvalue()
◆ read_qstring()
◆ read_sep()
◆ remove_first()
◆ same_authority()
◆ set_push_header()
◆ skip_ws()
◆ val_apr_hash()
◆ cbit_mask
Initial value:= {
0x80u,
0x40u,
0x20u,
0x10u,
0x08u,
0x04u,
0x02u,
0x01u,
}
Definition at line 728 of file h2_push.c.