|
Apache HTTPD
|
#include <assert.h>#include <stddef.h>#include "apr.h"#include "apr_strings.h"#include "apr_lib.h"#include "apr_strmatch.h"#include <httpd.h>#include <http_core.h>#include <http_connection.h>#include <http_log.h>#include <http_protocol.h>#include <http_ssl.h>#include <nghttp2/nghttp2.h>#include "h2_private.h"#include "h2.h"#include "h2_bucket_beam.h"#include "h2_c1.h"#include "h2_config.h"#include "h2_protocol.h"#include "h2_mplx.h"#include "h2_push.h"#include "h2_request.h"#include "h2_headers.h"#include "h2_session.h"#include "h2_stream.h"#include "h2_c2.h"#include "h2_conn_ctx.h"#include "h2_util.h"Go to the source code of this file.
Classes | |
| struct | val_len_check_ctx |
Macros | |
| #define | S_XXX (-2) /* Programming Error */ |
| #define | S_ERR (-1) /* Protocol Error */ |
| #define | S_NOP (0) /* No Change */ |
| #define | S_IDL (H2_SS_IDL + 1) |
| #define | S_RS_L (H2_SS_RSVD_L + 1) |
| #define | S_RS_R (H2_SS_RSVD_R + 1) |
| #define | S_OPEN (H2_SS_OPEN + 1) |
| #define | S_CL_L (H2_SS_CLOSED_L + 1) |
| #define | S_CL_R (H2_SS_CLOSED_R + 1) |
| #define | S_CLS (H2_SS_CLOSED + 1) |
| #define | S_CLN (H2_SS_CLEANUP + 1) |
Variables | |
| static int | trans_on_send [][H2_SS_MAX] |
| static int | trans_on_recv [][H2_SS_MAX] |
| static int | trans_on_event [][H2_SS_MAX] |
| #define S_CL_L (H2_SS_CLOSED_L + 1) |
Definition at line 89 of file h2_stream.c.
| #define S_CL_R (H2_SS_CLOSED_R + 1) |
Definition at line 90 of file h2_stream.c.
| #define S_CLN (H2_SS_CLEANUP + 1) |
Definition at line 92 of file h2_stream.c.
| #define S_CLS (H2_SS_CLOSED + 1) |
Definition at line 91 of file h2_stream.c.
Definition at line 83 of file h2_stream.c.
Definition at line 85 of file h2_stream.c.
Definition at line 84 of file h2_stream.c.
| #define S_OPEN (H2_SS_OPEN + 1) |
Definition at line 88 of file h2_stream.c.
| #define S_RS_L (H2_SS_RSVD_L + 1) |
Definition at line 86 of file h2_stream.c.
| #define S_RS_R (H2_SS_RSVD_R + 1) |
Definition at line 87 of file h2_stream.c.
| #define S_XXX (-2) /* Programming Error */ |
Definition at line 82 of file h2_stream.c.
|
static |
Definition at line 691 of file h2_stream.c.
|
static |
Definition at line 1101 of file h2_stream.c.
|
static |
Definition at line 1015 of file h2_stream.c.
|
static |
Definition at line 268 of file h2_stream.c.
|
static |
Definition at line 978 of file h2_stream.c.
|
static |
Definition at line 52 of file h2_stream.c.
| apr_status_t h2_stream_add_header | ( | h2_stream * | stream, |
| const char * | name, | ||
| size_t | nlen, | ||
| const char * | value, | ||
| size_t | vlen | ||
| ) |
Definition at line 730 of file h2_stream.c.
| void h2_stream_cleanup | ( | h2_stream * | stream | ) |
Cleanup references into requst processing.
| stream | the stream to cleanup |
Definition at line 615 of file h2_stream.c.
| h2_stream * h2_stream_create | ( | int | id, |
| apr_pool_t * | pool, | ||
| struct h2_session * | session, | ||
| h2_stream_monitor * | monitor, | ||
| int | initiated_on | ||
| ) |
Create a stream in H2_SS_IDLE state.
| id | the stream identifier |
| pool | the memory pool to use for this stream |
| session | the session this stream belongs to |
| monitor | an optional monitor to be called for events and state transisitions |
| initiated_on | the id of the stream this one was initiated on (PUSH) |
Definition at line 582 of file h2_stream.c.
| void h2_stream_destroy | ( | h2_stream * | stream | ) |
Destroy memory pool if still owned by the stream.
Definition at line 628 of file h2_stream.c.
| void h2_stream_dispatch | ( | h2_stream * | stream, |
| h2_stream_event_t | ev | ||
| ) |
Dispatch (handle) an event on the given stream.
| stream | the streama the event happened on |
| ev | the type of event |
Definition at line 392 of file h2_stream.c.
| apr_status_t h2_stream_end_headers | ( | h2_stream * | stream, |
| int | eos, | ||
| size_t | raw_bytes | ||
| ) |
Definition at line 842 of file h2_stream.c.
| const h2_priority * h2_stream_get_priority | ( | h2_stream * | stream, |
| struct h2_headers * | response | ||
| ) |
Get priority information set for this stream.
Definition at line 1240 of file h2_stream.c.
| apr_table_t * h2_stream_get_trailers | ( | h2_stream * | stream | ) |
Get optional trailers for this stream, may be NULL. Meaningful results can only be expected when the end of the response body has been reached.
| stream | to ask for trailers |
Definition at line 1230 of file h2_stream.c.
| apr_status_t h2_stream_in_consumed | ( | h2_stream * | stream, |
| apr_off_t | amount | ||
| ) |
Notify the stream that amount bytes have been consumed of its input since the last invocation of this method (delta amount).
Definition at line 1303 of file h2_stream.c.
| int h2_stream_is_at | ( | const h2_stream * | stream, |
| h2_stream_state_t | state | ||
| ) |
Determine if stream is at given state.
| stream | the stream to check |
| state | the state to look for |
Definition at line 1276 of file h2_stream.c.
| int h2_stream_is_at_or_past | ( | const h2_stream * | stream, |
| h2_stream_state_t | state | ||
| ) |
Determine if stream is reached given state or is past this state.
| stream | the stream to check |
| state | the state to look for |
Definition at line 1282 of file h2_stream.c.
Determine if stream is ready for submitting a response or a RST
| stream | the stream to check |
Definition at line 1255 of file h2_stream.c.
| void h2_stream_on_input_change | ( | h2_stream * | stream | ) |
Stream input signals change. Take necessary actions.
| stream | the stream to read output for |
Definition at line 1817 of file h2_stream.c.
| void h2_stream_on_output_change | ( | h2_stream * | stream | ) |
Stream output signals change. Take necessary actions.
| stream | the stream to read output for |
Definition at line 1763 of file h2_stream.c.
Definition at line 187 of file h2_stream.c.
| apr_status_t h2_stream_prepare_processing | ( | h2_stream * | stream | ) |
Perform any late initialization before stream starts processing.
Definition at line 211 of file h2_stream.c.
| apr_status_t h2_stream_read_to | ( | h2_stream * | stream, |
| apr_bucket_brigade * | bb, | ||
| apr_off_t * | plen, | ||
| int * | peos | ||
| ) |
Read a maximum number of bytes into the bucket brigade.
| stream | the stream to read from |
| bb | the brigade to append output to |
| plen | (in-/out) max. number of bytes to append and on return actual number of bytes appended to brigade |
| peos | (out) != 0 iff end of stream has been reached while reading |
Definition at line 1112 of file h2_stream.c.
| apr_status_t h2_stream_recv_DATA | ( | h2_stream * | stream, |
| uint8_t | flags, | ||
| const uint8_t * | data, | ||
| size_t | len | ||
| ) |
Definition at line 529 of file h2_stream.c.
| apr_status_t h2_stream_recv_frame | ( | h2_stream * | stream, |
| int | ftype, | ||
| int | flags, | ||
| size_t | frame_len | ||
| ) |
Definition at line 475 of file h2_stream.c.
Reset the stream. Stream write/reads will return errors afterwards.
| stream | the stream to reset |
| error_code | the HTTP/2 error code |
Definition at line 638 of file h2_stream.c.
| apr_status_t h2_stream_send_frame | ( | h2_stream * | stream, |
| int | ftype, | ||
| int | flags, | ||
| size_t | frame_len | ||
| ) |
Definition at line 425 of file h2_stream.c.
| void h2_stream_set_monitor | ( | h2_stream * | stream, |
| h2_stream_monitor * | monitor | ||
| ) |
Definition at line 387 of file h2_stream.c.
| void h2_stream_set_request | ( | h2_stream * | stream, |
| const h2_request * | r | ||
| ) |
Set complete stream headers from given h2_request.
| stream | stream to write request to |
| r | the request with all the meta data |
| eos | != 0 iff stream input is closed |
Definition at line 676 of file h2_stream.c.
| apr_status_t h2_stream_set_request_rec | ( | h2_stream * | stream, |
| request_rec * | r, | ||
| int | eos | ||
| ) |
Set complete stream header from given request_rec.
| stream | stream to write request to |
| r | the request with all the meta data |
| eos | != 0 iff stream input is closed |
Definition at line 650 of file h2_stream.c.
Return a textual representation of the stream state as in RFC 7540 nomenclator, all caps, underscores.
Definition at line 76 of file h2_stream.c.
| apr_status_t h2_stream_submit_pushes | ( | h2_stream * | stream, |
| struct h2_headers * | response | ||
| ) |
Submit any server push promises on this stream and schedule the streams for these.
| stream | the stream for which to submit |
Definition at line 1205 of file h2_stream.c.
Definition at line 1268 of file h2_stream.c.
|
static |
Definition at line 247 of file h2_stream.c.
|
static |
Definition at line 257 of file h2_stream.c.
Definition at line 221 of file h2_stream.c.
|
static |
Definition at line 226 of file h2_stream.c.
|
static |
Definition at line 167 of file h2_stream.c.
|
static |
Definition at line 146 of file h2_stream.c.
|
static |
Definition at line 162 of file h2_stream.c.
|
static |
Definition at line 157 of file h2_stream.c.
|
static |
Definition at line 132 of file h2_stream.c.
Definition at line 309 of file h2_stream.c.
|
static |
Definition at line 316 of file h2_stream.c.
Definition at line 323 of file h2_stream.c.
|
static |
Definition at line 1364 of file h2_stream.c.
Definition at line 684 of file h2_stream.c.
|
static |
Definition at line 419 of file h2_stream.c.
|
static |
Definition at line 1403 of file h2_stream.c.
|
static |
Definition at line 998 of file h2_stream.c.
|
static |
Definition at line 1565 of file h2_stream.c.
Definition at line 1737 of file h2_stream.c.
|
static |
Definition at line 1128 of file h2_stream.c.
Definition at line 200 of file h2_stream.c.
Definition at line 833 of file h2_stream.c.
|
static |
Definition at line 344 of file h2_stream.c.
Definition at line 123 of file h2_stream.c.
Definition at line 109 of file h2_stream.c.
Definition at line 95 of file h2_stream.c.