return "value must be On or Off";
}
return "value must be On or Off";
}
-#define AP_END_CMD { NULL }
+#define AP_END_CMD AP_INIT_TAKE1(NULL, NULL, NULL, RSRC_CONF, NULL)
+
const command_rec h2_cmds[] = {
AP_INIT_TAKE1("H2MaxSessionStreams", h2_conf_set_max_streams, NULL,
const command_rec h2_cmds[] = {
AP_INIT_TAKE1("H2MaxSessionStreams", h2_conf_set_max_streams, NULL,
static void h2_io_cleanup(h2_io *io)
{
static void h2_io_cleanup(h2_io *io)
{
}
void h2_io_destroy(h2_io *io)
}
void h2_io_destroy(h2_io *io)
void h2_response_destroy(h2_response *response)
{
void h2_response_destroy(h2_response *response)
{
}
h2_response *h2_response_copy(apr_pool_t *pool, h2_response *from)
}
h2_response *h2_response_copy(apr_pool_t *pool, h2_response *from)
h2_session *session = (h2_session *)userp;
apr_status_t status = send_data(session, (const char *)data, length);
h2_session *session = (h2_session *)userp;
apr_status_t status = send_data(session, (const char *)data, length);
+ (void)ngh2;
+ (void)flags;
if (status == APR_SUCCESS) {
return length;
}
if (status == APR_SUCCESS) {
return length;
}
h2_stream * stream;
apr_status_t status;
h2_stream * stream;
apr_status_t status;
if (session->aborted) {
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
if (session->aborted) {
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
h2_session *session = (h2_session *)userp;
h2_stream *stream;
h2_session *session = (h2_session *)userp;
h2_stream *stream;
if (session->aborted) {
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
if (session->aborted) {
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
const nghttp2_frame *frame, void *userp)
{
/* This starts a new stream. */
const nghttp2_frame *frame, void *userp)
{
/* This starts a new stream. */
int rv = stream_open((h2_session *)userp, frame->hd.stream_id);
if (rv != NGHTTP2_ERR_CALLBACK_FAILURE) {
/* on_header_cb or on_frame_recv_cb will dectect that stream
int rv = stream_open((h2_session *)userp, frame->hd.stream_id);
if (rv != NGHTTP2_ERR_CALLBACK_FAILURE) {
/* on_header_cb or on_frame_recv_cb will dectect that stream
h2_stream * stream;
apr_status_t status;
h2_stream * stream;
apr_status_t status;
+ (void)ngh2;
+ (void)flags;
if (session->aborted) {
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
if (session->aborted) {
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
h2_stream *stream;
AP_DEBUG_ASSERT(session);
h2_stream *stream;
AP_DEBUG_ASSERT(session);
+ (void)ng2s;
+ (void)buf;
+ (void)source;
stream = h2_stream_set_get(session->streams, stream_id);
if (!stream) {
ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_NOTFOUND, session->c,
stream = h2_stream_set_get(session->streams, stream_id);
if (!stream) {
ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_NOTFOUND, session->c,
int proposed = 0;
const char **protos = h2_h2_is_tls(c)? h2_tls_protos : h2_clear_protos;
int proposed = 0;
const char **protos = h2_h2_is_tls(c)? h2_tls_protos : h2_clear_protos;
if (strcmp(AP_PROTOCOL_HTTP1, ap_get_protocol(c))) {
/* We do not know how to switch from anything else but http/1.1.
*/
if (strcmp(AP_PROTOCOL_HTTP1, ap_get_protocol(c))) {
/* We do not know how to switch from anything else but http/1.1.
*/
const char **protos = h2_h2_is_tls(c)? h2_tls_protos : h2_clear_protos;
const char **p = protos;
const char **protos = h2_h2_is_tls(c)? h2_tls_protos : h2_clear_protos;
const char **p = protos;
while (*p) {
if (!strcmp(*p, protocol)) {
found = 1;
while (*p) {
if (!strcmp(*p, protocol)) {
found = 1;
{
h2_ctx *ctx = h2_ctx_get(c);
{
h2_ctx *ctx = h2_ctx_get(c);
if (h2_ctx_is_task(ctx)) {
h2_task_env *env = h2_ctx_get_task(ctx);
if (h2_ctx_is_task(ctx)) {
h2_task_env *env = h2_ctx_get_task(ctx);
apr_bucket_alloc_t *bucket_alloc)
{
h2_task_output *output = apr_pcalloc(pool, sizeof(h2_task_output));
apr_bucket_alloc_t *bucket_alloc)
{
h2_task_output *output = apr_pcalloc(pool, sizeof(h2_task_output));
if (output) {
output->env = env;
output->state = H2_TASK_OUT_INIT;
if (output) {
output->env = env;
output->state = H2_TASK_OUT_INIT;
else if (H2_HD_MATCH_LIT("cookie", name, nlen)) {
const char *existing = apr_table_get(to_h1->headers, "cookie");
if (existing) {
else if (H2_HD_MATCH_LIT("cookie", name, nlen)) {
const char *existing = apr_table_get(to_h1->headers, "cookie");
if (existing) {
/* Cookie headers come separately in HTTP/2, but need
* to be merged by "; " (instead of default ", ")
*/
/* Cookie headers come separately in HTTP/2, but need
* to be merged by "; " (instead of default ", ")
*/
- char *hvalue = apr_pstrndup(to_h1->pool, value, vlen);
- char *nval = apr_psprintf(to_h1->pool, "%s; %s", existing, hvalue);
+ hvalue = apr_pstrndup(to_h1->pool, value, vlen);
+ nval = apr_psprintf(to_h1->pool, "%s; %s", existing, hvalue);
apr_table_setn(to_h1->headers, "Cookie", nval);
return APR_SUCCESS;
}
apr_table_setn(to_h1->headers, "Cookie", nval);
return APR_SUCCESS;
}
{
apr_status_t status = APR_SUCCESS;
int same_alloc;
{
apr_status_t status = APR_SUCCESS;
int same_alloc;
AP_DEBUG_ASSERT(to);
AP_DEBUG_ASSERT(from);
same_alloc = (to->bucket_alloc == from->bucket_alloc);
AP_DEBUG_ASSERT(to);
AP_DEBUG_ASSERT(from);
same_alloc = (to->bucket_alloc == from->bucket_alloc);