|
Packit |
90a5c9 |
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
Packit |
90a5c9 |
* contributor license agreements. See the NOTICE file distributed with
|
|
Packit |
90a5c9 |
* this work for additional information regarding copyright ownership.
|
|
Packit |
90a5c9 |
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
Packit |
90a5c9 |
* (the "License"); you may not use this file except in compliance with
|
|
Packit |
90a5c9 |
* the License. You may obtain a copy of the License at
|
|
Packit |
90a5c9 |
*
|
|
Packit |
90a5c9 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit |
90a5c9 |
*
|
|
Packit |
90a5c9 |
* Unless required by applicable law or agreed to in writing, software
|
|
Packit |
90a5c9 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
Packit |
90a5c9 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
Packit |
90a5c9 |
* See the License for the specific language governing permissions and
|
|
Packit |
90a5c9 |
* limitations under the License.
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#ifndef __mod_h2__h2_headers__
|
|
Packit |
90a5c9 |
#define __mod_h2__h2_headers__
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#include "h2.h"
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
struct h2_bucket_beam;
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
extern const apr_bucket_type_t h2_bucket_type_headers;
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#define H2_BUCKET_IS_HEADERS(e) (e->type == &h2_bucket_type_headers)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
apr_bucket * h2_bucket_headers_make(apr_bucket *b, h2_headers *r);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
apr_bucket * h2_bucket_headers_create(apr_bucket_alloc_t *list,
|
|
Packit |
90a5c9 |
h2_headers *r);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
h2_headers *h2_bucket_headers_get(apr_bucket *b);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
apr_bucket *h2_bucket_headers_beam(struct h2_bucket_beam *beam,
|
|
Packit |
90a5c9 |
apr_bucket_brigade *dest,
|
|
Packit |
90a5c9 |
const apr_bucket *src);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/**
|
|
Packit |
90a5c9 |
* Create the headers from the given status and headers
|
|
Packit |
90a5c9 |
* @param status the headers status
|
|
Packit |
90a5c9 |
* @param header the headers of the headers
|
|
Packit |
90a5c9 |
* @param notes the notes carried by the headers
|
|
Packit |
90a5c9 |
* @param raw_bytes the raw network bytes (if known) used to transmit these
|
|
Packit |
90a5c9 |
* @param pool the memory pool to use
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
h2_headers *h2_headers_create(int status, apr_table_t *header,
|
|
Packit |
90a5c9 |
apr_table_t *notes, apr_off_t raw_bytes,
|
|
Packit |
90a5c9 |
apr_pool_t *pool);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/**
|
|
Packit |
90a5c9 |
* Create the headers from the given request_rec.
|
|
Packit |
90a5c9 |
* @param r the request record which was processed
|
|
Packit |
90a5c9 |
* @param status the headers status
|
|
Packit |
90a5c9 |
* @param header the headers of the headers
|
|
Packit |
90a5c9 |
* @param pool the memory pool to use
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
h2_headers *h2_headers_rcreate(request_rec *r, int status,
|
|
Packit |
90a5c9 |
apr_table_t *header, apr_pool_t *pool);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/**
|
|
Packit |
90a5c9 |
* Clone the headers into another pool. This will not copy any
|
|
Packit |
90a5c9 |
* header strings.
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
h2_headers *h2_headers_copy(apr_pool_t *pool, h2_headers *h);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/**
|
|
Packit |
90a5c9 |
* Create the headers for the given error.
|
|
Packit |
90a5c9 |
* @param stream_id id of the stream to create the headers for
|
|
Packit |
90a5c9 |
* @param type the error code
|
|
Packit |
90a5c9 |
* @param req the original h2_request
|
|
Packit |
90a5c9 |
* @param pool the memory pool to use
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
h2_headers *h2_headers_die(apr_status_t type,
|
|
Packit |
90a5c9 |
const struct h2_request *req, apr_pool_t *pool);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
int h2_headers_are_response(h2_headers *headers);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#endif /* defined(__mod_h2__h2_headers__) */
|