python: Update according to HPACK change, but flags are not used yet

This commit is contained in:
Tatsuhiro Tsujikawa 2014-04-02 02:16:39 +09:00
parent c9f90924a9
commit 9d9eb48258
2 changed files with 9 additions and 0 deletions

View File

@ -53,11 +53,16 @@ cdef extern from 'nghttp2/nghttp2.h':
NGHTTP2_PUSH_PROMISE
NGHTTP2_GOAWAY
ctypedef enum nghttp2_nv_flag:
NGHTTP2_NV_FLAG_NONE
NGHTTP2_NV_FLAG_NO_INDEX
ctypedef struct nghttp2_nv:
uint8_t *name
uint8_t *value
uint16_t namelen
uint16_t valuelen
uint8_t flags
ctypedef enum nghttp2_settings_id:
SETTINGS_HEADER_TABLE_SIZE
@ -146,6 +151,7 @@ cdef extern from 'nghttp2/nghttp2.h':
const nghttp2_frame *frame,
const uint8_t *name, size_t namelen,
const uint8_t *value, size_t valuelen,
uint8_t flags,
void *user_data)
ctypedef int (*nghttp2_on_frame_send_callback)\

View File

@ -112,6 +112,7 @@ cdef class HDDeflater:
nvap[0].namelen = len(k)
nvap[0].value = v
nvap[0].valuelen = len(v)
nvap[0].flags = cnghttp2.NGHTTP2_NV_FLAG_NONE
nvap += 1
cdef cnghttp2.nghttp2_bufs bufs
@ -294,6 +295,7 @@ cdef size_t _make_nva(cnghttp2.nghttp2_nv **nva_ptr, headers):
nva[i].namelen = len(k)
nva[i].value = v
nva[i].valuelen = len(v)
nva[i].flags = cnghttp2.NGHTTP2_NV_FLAG_NONE
nva_ptr[0] = nva
@ -303,6 +305,7 @@ cdef int server_on_header(cnghttp2.nghttp2_session *session,
const cnghttp2.nghttp2_frame *frame,
const uint8_t *name, size_t namelen,
const uint8_t *value, size_t valuelen,
uint8_t flags,
void *user_data):
cdef http2 = <_HTTP2SessionCore>user_data