HTTP2: Update to nghttp2 lib 0.5.0
Change-Id: Ia63c066e482f633ef5096f2341d74de749422102 Reviewed-on: https://code.wireshark.org/review/3104 Reviewed-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
parent
4b720691c4
commit
5cc2ab74af
|
@ -35,7 +35,7 @@ extern "C" {
|
|||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "nghttp2ver.h"
|
||||
#include <nghttp2ver.h>
|
||||
|
||||
/**
|
||||
* @macro
|
||||
|
@ -346,10 +346,6 @@ typedef enum {
|
|||
NGHTTP2_ERR_CALLBACK_FAILURE = -902
|
||||
} nghttp2_error;
|
||||
|
||||
typedef enum {
|
||||
NGHTTP2_MSG_MORE
|
||||
} nghttp2_io_flag;
|
||||
|
||||
/**
|
||||
* @enum
|
||||
*
|
||||
|
@ -518,6 +514,8 @@ typedef enum {
|
|||
*/
|
||||
NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE = 0x04
|
||||
} nghttp2_settings_id;
|
||||
/* Note: If we add SETTINGS, update the capacity of
|
||||
NGHTTP2_INBOUND_NUM_IV as well */
|
||||
|
||||
/**
|
||||
* @macro
|
||||
|
|
|
@ -236,8 +236,8 @@ ssize_t nghttp2_bufs_len(nghttp2_bufs *bufs)
|
|||
|
||||
static ssize_t bufs_avail(nghttp2_bufs *bufs)
|
||||
{
|
||||
return (ssize_t)(nghttp2_buf_avail(&bufs->cur->buf) +
|
||||
(bufs->chunk_length - bufs->offset) * (bufs->max_chunk - bufs->chunk_used));
|
||||
return (ssize_t)nghttp2_buf_avail(&bufs->cur->buf) +
|
||||
(bufs->chunk_length - bufs->offset) * (bufs->max_chunk - bufs->chunk_used);
|
||||
}
|
||||
|
||||
static int bufs_alloc_chain(nghttp2_bufs *bufs)
|
||||
|
@ -474,3 +474,4 @@ int nghttp2_bufs_next_present(nghttp2_bufs *bufs)
|
|||
|
||||
return chain && nghttp2_buf_len(&chain->buf);
|
||||
}
|
||||
|
||||
|
|
|
@ -368,4 +368,4 @@ int nghttp2_bufs_next_present(nghttp2_bufs *bufs);
|
|||
*/
|
||||
ssize_t nghttp2_bufs_len(nghttp2_bufs *bufs);
|
||||
|
||||
#endif /* NGHTTP2_BUF_H */
|
||||
#endif /* NGHTTP2_BUF_H */
|
||||
|
|
|
@ -133,12 +133,6 @@ static uint32_t hash(const uint8_t *s, size_t n)
|
|||
return h;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
nghttp2_nv *nva;
|
||||
size_t nvacap;
|
||||
size_t nvlen;
|
||||
} nghttp2_nva_out;
|
||||
|
||||
int nghttp2_hd_entry_init(nghttp2_hd_entry *ent, uint8_t flags,
|
||||
uint8_t *name, size_t namelen,
|
||||
uint8_t *value, size_t valuelen)
|
||||
|
@ -1334,6 +1328,8 @@ int nghttp2_hd_deflate_new(nghttp2_hd_deflater **deflater_ptr,
|
|||
rv = nghttp2_hd_deflate_init2(deflater, deflate_hd_table_bufsize_max);
|
||||
|
||||
if(rv != 0) {
|
||||
free(deflater);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -2015,7 +2011,7 @@ ssize_t nghttp2_hd_inflate_hd(nghttp2_hd_inflater *inflater,
|
|||
|
||||
goto fail;
|
||||
}
|
||||
return (ssize_t)(in - first);
|
||||
return in - first;
|
||||
|
||||
fail:
|
||||
DEBUGF(fprintf(stderr, "inflatehd: error return %zd\n", rv));
|
||||
|
@ -2045,6 +2041,8 @@ int nghttp2_hd_inflate_new(nghttp2_hd_inflater **inflater_ptr)
|
|||
rv = nghttp2_hd_inflate_init(inflater);
|
||||
|
||||
if(rv != 0) {
|
||||
free(inflater);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* @macro
|
||||
* Version number of the nghttp2 library release
|
||||
*/
|
||||
#define NGHTTP2_VERSION "0.4.2-DEV"
|
||||
#define NGHTTP2_VERSION "0.5.0"
|
||||
|
||||
/**
|
||||
* @macro
|
||||
|
@ -37,6 +37,6 @@
|
|||
* release. This is a 24 bit number with 8 bits for major number, 8 bits
|
||||
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
|
||||
*/
|
||||
#define NGHTTP2_VERSION_NUM 0x000402
|
||||
#define NGHTTP2_VERSION_NUM 0x000500
|
||||
|
||||
#endif /* NGHTTP2VER_H */
|
||||
|
|
Loading…
Reference in New Issue