Tatsuhiro Tsujikawa
a584cf5a4f
Use clang-format-4.0
2017-04-30 15:45:53 +09:00
Tatsuhiro Tsujikawa
85a12429ee
Eliminate _U_ macro
...
Instead use (void)VAR for better compiler compatibility.
2017-03-11 18:45:49 +09:00
Alexis La Goutte
ae87a44b94
nghttp2_hd: fix It is odd that the body of 'hd_get_num_table_entries' function is fully equivalent to the body of 'get_max_index' function found by PVS Studio (V524)
2017-01-03 22:03:53 +01:00
Matt Rudary
5a81f2441f
Prevent undefined behavior in decode_length
2016-11-11 11:12:43 -05:00
Tatsuhiro Tsujikawa
0cf6848646
clang-format-3.9
2016-10-15 18:36:04 +09:00
Tatsuhiro Tsujikawa
bc0f501dd3
Replace final with fin to make clang-format-3.9 happy
2016-10-15 18:25:13 +09:00
Tatsuhiro Tsujikawa
19340da8d4
Re-format debug text output
2016-10-14 22:59:05 +09:00
Tatsuhiro Tsujikawa
5e99531b4d
clang-format
2016-10-14 22:59:05 +09:00
Tatsuhiro Tsujikawa
bef3d47c16
Rename functions and nghttp2_debug.h to move debug macro there
2016-10-14 22:59:05 +09:00
Anders Bakken
bc3dc6b765
Add set_nghttp2_debug_callback to take advantage of DEBUGF statements in
...
when building DEBUGBUILD.
2016-10-13 13:24:26 -07:00
Tatsuhiro Tsujikawa
743fc4a3c3
Use the similar naming scheme for table size as 392256e542
2016-09-11 22:25:01 +09:00
Wenfeng Liu
00c80a15c0
lib: Make emit_header() return void since it always succeed.
2016-08-23 13:40:14 +00:00
Tatsuhiro Tsujikawa
d0fea96e69
Allow nonuniform buffer size in nghttp2_hd_deflate_hd_vec()
2016-08-18 21:23:17 +09:00
Tatsuhiro Tsujikawa
9b864380a5
Use nghttp2_vec in nghttp2_hd_deflate_hd_vec
...
This change is for the future enhancement where we loose the
requirement about the chunk size for each buffer.
2016-08-17 21:09:29 +09:00
Tatsuhiro Tsujikawa
c4d36aeff7
Make parameters const pointer
2016-08-16 10:55:51 +09:00
Tatsuhiro Tsujikawa
f50596e355
Merge branch 'master' of https://github.com/weliu/nghttp2 into weliu-master
2016-08-16 09:59:50 +09:00
Wenfeng Liu
abf81b5bb7
lib: Add nghttp2_hd_deflate_hd_vec() deflate API to support multiple bufs input
2016-08-15 10:28:45 +00:00
Tatsuhiro Tsujikawa
0c7d48dede
Make result type of hd_inflate_commit_indexed void
2016-08-11 11:33:09 +09:00
Wenfeng Liu
65cc2f0515
lib: since hd_inflate_commit_indexed() always return 0, remove the
...
return value check in nghttp2_hd_inflate_hd_nv().
2016-08-11 02:00:43 +00:00
Tatsuhiro Tsujikawa
3f31424ee2
Merge branch 'master' of https://github.com/weliu/nghttp2 into weliu-master
2016-08-09 22:01:10 +09:00
Wenfeng Liu
e0119452a3
Use memeq() instead of lstreq() in lookup_token().
2016-08-09 04:15:38 +00:00
Tatsuhiro Tsujikawa
60cae325bc
Search dynamic table first for optimization
2016-08-08 00:27:16 +09:00
Wenfeng Liu
af9aeee752
1. Modify genlibtokenlookup.py to remove redundant header comparisons.
...
2. Remove inline qualifier of lookup_token() in genlibtokenlookup.py.
2016-08-05 09:56:15 +00:00
Wenfeng Liu
f619286ca3
Make get_max_index() return the max index in frame, so we don't need
...
to do extra calculation
2016-08-04 01:26:13 +00:00
Tatsuhiro Tsujikawa
fdc27c9f0e
Specify 1 for 2nd parameter of fwrite as a convention
2016-06-22 23:29:09 +09:00
Tatsuhiro Tsujikawa
2a96d433ec
Add nghttp2_hd_inflate_hd2() and deprecate nghttp2_hd_inflate_hd()
...
The difference between them are former has const qualifier to the |in|
parameter, which is desirable since it is effectively read-only.
2016-05-14 18:25:20 +09:00
Tatsuhiro Tsujikawa
5ff6da11b1
Refactor map remove
2016-05-14 11:34:51 +09:00
Tatsuhiro Tsujikawa
e58db4f8b0
Attempt to fix compile error with msvc
2016-03-14 00:54:02 +09:00
Tatsuhiro Tsujikawa
3db9c2c796
Remove extra tokenization of header names; they are not effective at best
2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
ff0d137fb3
Reference counted HPACK name/value pair
2016-03-12 21:12:27 +09:00
Tatsuhiro Tsujikawa
8da20975f9
Always allocate buffer for name, and value
2016-03-12 21:12:26 +09:00
Tatsuhiro Tsujikawa
7921029e33
Tokenize extra HTTP header fields
...
The extra HTTP header fields are compiled from
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers ,
https://en.wikipedia.org/wiki/List_of_HTTP_header_fields , and
https://www.owasp.org/index.php/List_of_useful_HTTP_headers .
2016-02-20 23:30:02 +09:00
Tatsuhiro Tsujikawa
41002a77d4
Remove bogus debug log
2015-10-29 23:01:02 +09:00
Tatsuhiro Tsujikawa
25bf567cd7
Don't always expect dynamic table size update
...
The encoder is not required to send dynamic table size update if the
table size is not changed from the previous value after accepting new
maximum value.
2015-10-24 17:49:51 +09:00
Tatsuhiro Tsujikawa
ce74a30990
Use -fvisibility=hidden for internal functions
...
This will improve performance since we can avoid indirect call of
internal functions. The downside is we now require libnghttp2 static
library to run unit tests.
2015-10-23 00:08:15 +09:00
Tatsuhiro Tsujikawa
2d5b42693d
Don't expect NULL terminated name/value in nghttp2_hd_deflate_hd
...
If it is called through libnghttp2 internally, name/value pairs are
all NULL-terminated. But it is one of public API, and we cannot
expect that applications always make NULL-terminated string for
name/value pairs.
2015-09-26 22:41:05 +09:00
Tatsuhiro Tsujikawa
d804780c25
Fix compile error with Android NDK and --enable-werror
2015-09-25 01:45:28 +09:00
Tatsuhiro Tsujikawa
913b95336b
Fix warning 'this decimal constant is unsigned only in ISO C90'
2015-09-25 00:03:38 +09:00
Tatsuhiro Tsujikawa
170f2a144a
Fix warning with gcc
2015-09-23 18:26:02 +09:00
Tatsuhiro Tsujikawa
28fe3e7e89
More warning flags for --enable-werror
2015-09-23 16:49:45 +09:00
Tatsuhiro Tsujikawa
230b1f927f
Use hash table for dynamic table lookup
2015-09-19 21:29:40 +09:00
Tatsuhiro Tsujikawa
f3288092e8
Strictly check occurrence of dynamic table size update
...
RFC 7541 requires that dynamic table size update must occur at the
beginning of the first header block, and is signaled as SETTINGS
acknowledgement. This commit checks these conditions. If dynamic
table size update appears other than the beginning of the first header
block, it is treated as error. If SETTINGS ACK is received, and next
HEADERS header block does not have dynamic table size update, it is
treated as error.
2015-07-22 00:11:23 +09:00
Tatsuhiro Tsujikawa
f0379aa428
Fix invalid memory free
2015-05-22 23:36:34 +09:00
Tatsuhiro Tsujikawa
a8625e15f0
clang-format
2015-05-08 19:24:17 +09:00
Alexis La Goutte
1241c951d6
rv is only used in an assert.
...
The assert only evaluates to code if NDEBUG is undefined. Protect rv and its use accordingly
Issue reported by Joerg Mayer
https://code.wireshark.org/review/8260
2015-05-07 15:20:24 +02:00
Tatsuhiro Tsujikawa
fc17c0a618
Fix global-buffer-overflow
2015-05-07 19:37:43 +09:00
Tatsuhiro Tsujikawa
02468b1ca1
Allocate field name and value in the same buffer if indname to dynamic table
2015-04-26 18:43:24 +09:00
Tatsuhiro Tsujikawa
58b7f4a096
Fix inline error with travis gcc-4.8
2015-04-22 23:59:23 +09:00
Tatsuhiro Tsujikawa
91ad7e150e
Never indexing still can use header field name in dynamic table
2015-04-19 18:21:26 +09:00
Tatsuhiro Tsujikawa
a3fa257473
Fix compile error with Android NDK r10d + --enable-werror
2015-04-17 23:46:19 +09:00