aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-http2.c
AgeCommit message (Collapse)AuthorFilesLines
2017-11-30http2: select fields from Decompressed header tab when possiblePeter Wu1-14/+18
The "Decompressed header" tab contains some human-readable text, but no field was associated with it. Instead, the fields were attached to raw compressed headers which, all with the same offset and length. Ensure that each byte in the decompressed header tab is accounted for. The only fields that are still pointing to the raw compressed buffer is the http2.header field (covering a full raw header), the representation type (a few bits, at most 1 octet) and the index length (guessed length, an exact value is probably not worth the cpu cycles). Change-Id: Ic0118e9ed583841a2d353f8b8c28dcafea3401f2 Reviewed-on: https://code.wireshark.org/review/24660 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-26HTTP2: Store all packets' header indexes in header_stream_info structHuang Qiangxiong1-8/+87
Store all packets' headers indexes of oneway stream in its header_stream_info struct. (Just store pointers refer to each HEADERS or CONTINUATION packets' header arrays) Add http2_get_header_value() function to allow other dissectors to get HTTP2 headers of this stream later in DATA frames. Ping-Bug: 13932 Change-Id: I9f623f66045845c338cd6233d4c6da3f6875fc69 Reviewed-on: https://code.wireshark.org/review/22859 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-22HTTP2: pass in the media type parameters to the media type dissectorRyan Doyle1-3/+61
A full media type could be "text/html; charset=utf-8". The the media type dissector wasn't being called properly with only the "text/html" but instead the whole string. Additionally, make sure that the media type parameters are passed in correctly which is important for things like multipart/* which should have a boundary. Most of the string parsing code was adapted from packet-spdy.c:spdy_parse_content_type(). Change-Id: Ide59da8f65264dc142e0f9bb67671ce2af66c8a2 Reviewed-on: https://code.wireshark.org/review/23140 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-25HTTP2: Fix an access invalid memory address error.Huang Qiangxiong1-1/+1
The tree may be NULL, so tree->parent may cause access invalid memory address error which will report 'Dissector bug ... STATUS_ACCESS_VIOLATION' in info column. Change-Id: I37d4aca2287e77a046e553221a6a824de60aae9c Reviewed-on: https://code.wireshark.org/review/22776 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-22HTTP2: Fix missing ifdef HAVE_NGHTTP2Uli Heilmeier1-0/+2
media_type_dissector_table is only defined with HAVE_NGHTTP2 Change-Id: I489e04f3d3066f2edf5c656b158c38c3dae84fb6 Reviewed-on: https://code.wireshark.org/review/22760 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-22HTTP2: Dissect reassembled http2.data.data according to content-type (as ↵Huang Qiangxiong1-4/+72
text/html, png, application/grpc and etc) and some enhancement for displays. Change Details: 1. Just like HTTP1.1, dissect reassembled http2.data.data according to content-type header value (searching media_type dissector table). With this feature, we can add new dissector that based HTTP2 (for example application/grpc), or old text/html, image/png, image/jpeg dissectors. 2. Append stream id after frame type on info column, like: HEADERS[1], DATA[1], HEADERS[3], DATA[3] 3. Append request :method and :path inforamtion to info column, like: HEADERS[1]: GET /demo/1.jpg. (and also append :method and :path info to Stream Node in tree) 4. Append response status and reason-phrase to info column, like: HEADERS[1]: 200 OK One HTTP2 package file's info column will look like: 10.10.10.123 23.13.190.101 Magic 10.10.10.123 23.13.190.101 SETTINGS[0] 10.10.10.123 23.13.190.101 WINDOW_UPDATE[0] 10.10.10.123 23.13.190.101 HEADERS[1]: GET /demo 23.13.190.101 10.10.10.123 SETTINGS[0] 23.13.190.101 10.10.10.123 SETTINGS[0] 10.10.10.123 23.13.190.101 SETTINGS[0] 23.13.190.101 10.10.10.123 HEADERS[1]: 200 OK 23.13.190.101 10.10.10.123 DATA[1], DATA[1], DATA[1], DATA[1] (text/html) 10.10.10.123 23.13.190.101 HEADERS[3]: GET /demo/tile-0.png 10.10.10.123 23.13.190.101 HEADERS[5]: GET /demo/tile-1.png 10.10.10.123 23.13.190.101 HEADERS[7]: GET /demo/tile-2.png 10.10.10.123 23.13.190.101 HEADERS[9]: GET /demo/tile-3.png 10.10.10.123 23.13.190.101 HEADERS[11]: GET /demo/tile-4.png 23.13.190.101 10.10.10.123 SETTINGS[0] 23.13.190.101 10.10.10.123 SETTINGS[0] 10.10.10.123 23.13.190.101 SETTINGS[0] 23.13.190.101 10.10.10.123 HEADERS[5]: 200 OK 23.13.190.101 10.10.10.123 DATA[5] 23.13.190.101 10.10.10.123 HEADERS[7]: 200 OK 23.13.190.101 10.10.10.123 DATA[5], DATA[5] (PNG), DATA[5] 23.13.190.101 10.10.10.123 HEADERS[11]: 200 OK 23.13.190.101 10.10.10.123 DATA[7], DATA[7] (PNG), DATA[11], DATA[11] (PNG) 23.13.190.101 10.10.10.123 HEADERS[3]: 200 OK 23.13.190.101 10.10.10.123 DATA[3], DATA[3] (PNG) 23.13.190.101 10.10.10.123 HEADERS[7]: 200 OK 23.13.190.101 10.10.10.123 DATA[9], DATA[9] (PNG) Change-Id: I4452dadeeefc49806e3036a44d44b5f5186096b9 Reviewed-on: https://code.wireshark.org/review/22715 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-22HTTP2: Fix compilation without HAVE_NGHTTP2.Gerald Combs1-1/+1
Change-Id: I7319a9d244e541c18d3492c3ca5eac1dff8e1313 Reviewed-on: https://code.wireshark.org/review/22360 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-06-22http2: reassemble entity bodies in data framesRyan Doyle1-3/+513
This commit reassembles data frames to build up the full entity body. It does this for both client/server request and responses. Additionally, it also decompresses bodies if they have the correct content-encoding header provided and are not partial bodies. Bug: 13543 Change-Id: I1661c9ddd09c1f6cf5a08b2b1921f95103aebb52 Reviewed-on: https://code.wireshark.org/review/20737 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-13Improve the HTTP2 dissector by not inserting empty padding, which looks ugly.Richard Sharpe1-9/+17
Change-Id: Ia01ae12fc9a22a7d0031c4580bbafe09f75881b5 Reviewed-on: https://code.wireshark.org/review/22104 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-05Remove "length only" check for dissectors that use tcp_dissect_pdus.Michael Mann1-4/+0
If a TCP segment is small enough, dissectors that have a only a length check determining if it's their packet or not before calling tcp_dissect_pdus will throw out packets that are probably destined for them. Change-Id: I78034307b56aa537943191a6887166577936a6a3 Reviewed-on: https://code.wireshark.org/review/21950 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-02Use col_append_sep_str() for fixed stringsStig Bjørlykke1-1/+1
Change from col_append_sep_fstr() to col_append_sep_str() when appending strings without formatting. Change-Id: I315aca9b815c204a5bc78f7326402c40d1325f0e Reviewed-on: https://code.wireshark.org/review/20846 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-13Remove nghttp2 code and use system' nghttp2Balint Reczey1-2/+42
Update debian, macos (setup / homebrew) download script Update testsuite (don't try HPACK when build without nghttp2) Change-Id: I365e5e17bc4fab4acd81b4c39ea7189a5d1ee112 Reviewed-on: https://code.wireshark.org/review/17347 Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-1/+1
This patch introduces new APIs to allow dissectors to have a preference for a (TCP) port, but the underlying data is actually part of Decode As functionality. For now the APIs are intentionally separate from the regular APIs that register a dissector within a dissector table. It may be possible to eventually combine the two so that all dissectors that register with a dissector table have an opportunity to "automatically" have a preference to adjust the "table value" through the preferences dialog. The tcp.port dissector table was used as the guinea pig. This will eventually be expanded to other dissector tables as well (most notably UDP ports). Some dissectors that "shared" a TCP/UDP port preference were also converted. It also removed the need for some preference callback functions (mostly when the callback function was the proto_reg_handoff function) so there is cleanup around that. Dissectors that has a port preference whose default was 0 were switched to using the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference Also added comments for TCP ports used that aren't IANA registered. Change-Id: I99604f95d426ad345f4b494598d94178b886eb67 Reviewed-on: https://code.wireshark.org/review/17724 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-08-24HTTP2: Display PUSH_PROMISE Header in bytesAlexis La Goutte1-4/+4
and also use the name of spec for field (Header BLock Fragment Change-Id: I5a3884186258dac1f243f991a3392c875403eb97 Reviewed-on: https://code.wireshark.org/review/17310 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-08-18HTTP2: export dissect_http2_pduAlexis La Goutte1-1/+2
for used on another dissector... Change-Id: I7c27517ee26ee9f9384e22a83e547550863093d8 Reviewed-on: https://code.wireshark.org/review/17133 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-19HTTP2: Add final RFC(7838) of HTTP Alternative Services (ALTSVC)Alexis La Goutte1-62/+21
Change-Id: I66e24f5a28ed44dc466614b09e33b85c6a957df5 Reviewed-on: https://code.wireshark.org/review/14987 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20Create call_data_dissector() to call data dissector.Michael Mann1-3/+0
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-22HTTP2: Reduce resource usage.Tatsuhiro Tsujikawa1-18/+141
Cache decoded header fields in order to conserve memory. If we try to decompress more than 256 KB or find 200 or more headers stop decompressing and add an expert item. Note that we might want to make the maximum values configurable via preferences. Bug:12077 Change-Id: Idf7cb1046c96cf87e1b53af6c56e19b4abad1dfb Reviewed-on: https://code.wireshark.org/review/13746 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-03HTTP2: fix 'http2' exists multiple times with NOT compatible types: FT_NONE ↵Alexis La Goutte1-4/+4
and FT_PROTOCOL Change-Id: I5cb75b253c908994420107330743e808f57af2a4 Reviewed-on: https://code.wireshark.org/review/13676 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-0/+1
It's not tied to the frame_data structure any more, so it belongs by itself. Clean up some #includes while we're at it; in particular, frame_data.h doesn't use anything related to tvbuffs, so don't have it gratuitiously include tvbuff.h. Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c Reviewed-on: https://code.wireshark.org/review/13518 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-14ssl: improve interaction with heuristics subdissectorsPeter Wu1-3/+13
Do not call heuristics dissectors when the SSL application data protocol is known (via STARTTLS or via an earlier packet in session). When the protocol is *not* known, first try heuristics on the initial payload. If a match is found, it can then override the protocol that would otherwise be used due to a port number match. The HTTP2 dissector is adjusted to take advantage of that such that HTTP2 on non-standard ports still get detected as HTTP2. Also save dissector registration to avoid the http2 dissector from showing up as "(null)". Now HTTP2 is really shown as "http2" and not "http" in the "Application Data Protocol"! The CredSSP dissector is untested and not modified as I don't know if the whole stream will be SSL. Tested with fix-ssl.pcap and a http2 capture (from bug 11331) wrapped in SSL (without ALPN). Change-Id: I134e2d4ac22287bc0a5aeadb1e38cb4059fa108b Reviewed-on: https://code.wireshark.org/review/13179 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-26HTTP2: fix cast from 'const void *' to 'struct HTTP2Tap *' drops const ↵Alexis La Goutte1-1/+1
qualifier [-Wcast-qual] Change-Id: I9d0ba8eb1ce5a3e3f867266f3fbad0727984fca2 Reviewed-on: https://code.wireshark.org/review/12873 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-07Remove some unnecessary includes.Guy Harris1-2/+0
Either remove them completely, or put them inside an #ifdef. Change-Id: Iceff4909e250c17812f38d94e067f7c37ab72e1b Reviewed-on: https://code.wireshark.org/review/11630 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-09-03Address "shadow" warnings found by checkAPI script.Michael Mann1-3/+3
These aren't "true" shadow issues, but the script doesn't completely understand C syntax (for things like struct member names "time" and "index"). But fixing them creates less noise. Change-Id: I5a2db1549095824530428529e86cab453c031a04 Reviewed-on: https://code.wireshark.org/review/10368 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-02HTTP2: remove weak part of the heuristicPascal Quantin1-6/+2
It is so fragile that it triggers too many false positives and it was not activated by default prior to g21e5a95. If required, a user can still use 'Decode As' functionality. Change-Id: I0236609665c57c6f3961cb9596c47b54da777641 Reviewed-on: https://code.wireshark.org/review/9842 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-17Remove all preferences related to enabling/disabling heuristic dissectors.Michael Mann1-13/+4
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector. Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled. Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22 Reviewed-on: https://code.wireshark.org/review/9610 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12Add "user presentable" and "unique string ids" to heuristic table entries.Michael Mann1-2/+2
This allows better presentation of heuristic dissectors to the end user. Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6 Reviewed-on: https://code.wireshark.org/review/9602 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-05-17HTTP2: Update to final RFCAlexis La Goutte1-3/+2
Change-Id: I0b19d4576b652dc9dd94346c75945e0bdc554a0e RFC7540: Hypertext Transfer Protocol Version 2 (HTTP/2) RFC7541: HPACK: Header Compression for HTTP/2 Reviewed-on: https://code.wireshark.org/review/8478 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-24http2: fix dissection over TLSEdward Dao1-4/+13
Previously, the http2 heuristics dissector sets a conversation dissector which overrides the SSL dissector, breaking SSL decryption before http2. This patch fixes that by checking for an active http2 session in the http2 heuristics dissector. Change-Id: Ibacbcde3e29bbb746ad2e394f1c10ca571b07bf5 Reviewed-on: https://code.wireshark.org/review/7782 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-12http2: improve heuristics, remember conversationPeter Wu1-15/+13
Enable the reliable Magic Hello heuristics by default and dissect further packets as HTTP2 as well. The weak frame heuristics is still disabled by default. Change-Id: I783d036fb6c6d867daedf251a5264fdf3b475447 Reviewed-on: https://code.wireshark.org/review/7615 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-04HTTP2: Add tap for HTTP2 dissectorAlexis La Goutte1-0/+43
Change-Id: Ib13d9391b64dad19321a4399c95b95d7fb791284 Reviewed-on: https://code.wireshark.org/review/6421 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-03HTTP2: Fix offset for heuristicAlexis La Goutte1-1/+2
With >= draft-14, length is encoded in 3 octets (2 octets before) Bug: 10908 Change-Id: I061570186206548fafcc39a8df0ba6bafe8576a0 Reviewed-on: https://code.wireshark.org/review/6883 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-27Lua: Expose tcp_dissect_pdus() to LuaHadriel Kaplan1-1/+2
Provide a way for Lua-based dissectors to invoke tcp_dissect_pdus() to make TCP-based dissection easier. Bug: 9851 Change-Id: I91630ebf1f1fc1964118b6750cc34238e18a8ad3 Reviewed-on: https://code.wireshark.org/review/6778 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-01-20HTTP2: fix test failure on Solaris SPARCPascal Quantin1-4/+6
Do not make any assumption on the endianness: not all hosts running Wireshark are little endian Change-Id: I8792904f7000b4f2b9e44ffe41f350ba8b4932d4 Reviewed-on: https://code.wireshark.org/review/6693 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-23Deleting unneccessary #includes from dissectors.Martin Mathieson1-3/+0
Second batch (packet-eth.c -> packet-icmpv6.d). Will look at cleaning up and committing script afterwards. Change-Id: I14295758b81a59115d8c88899f166cc3d5d17594 Reviewed-on: https://code.wireshark.org/review/6013 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-16HTTP2: Update to draft-16Alexis La Goutte1-3/+3
Also update HTTP Header Compression (to draft-10) No framing change on HTTP2 draft-16 Change-Id: I7f8ffd7ab37bc22fd6fbe156b0bf52543025e3a8 Reviewed-on: https://code.wireshark.org/review/5782 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-13Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-15/+15
(for some dissectors which fetch all other integral fields using ENC_BIG_ENDIAN). Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56 Reviewed-on: https://code.wireshark.org/review/5748 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-30HTTP2: Update to draft-15Alexis La Goutte1-15/+19
* Add new error code (HTTP_1_1_REQUIRED) * Use hexa value for error code (like the spec) * Add reference to Alt-SVC spec Change-Id: Ifbcb32e97168440cb34f59740871b6c896e90461 Reviewed-on: https://code.wireshark.org/review/4992 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-19packet-http2.c: Do encoding-arg changes (all benign)Bill Meier1-23/+23
For: - FT_BYTES: Always use just ENC_NA - integral/floating (other than FT_[U]INT8): Do ENC_NA --> ENC_BIG_ENDIAN Change-Id: I0885f7d110014cb8a7eba1c1892ed8d0852d076a Reviewed-on: https://code.wireshark.org/review/4187 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-19packet-http2.c: Fix a very minor bugBill Meier1-1/+1
- incorrect fetch/display of hf_http2_push_promise_r field Change-Id: Iddf2db4807713017519b5abcbff3ba824b3624c6 Reviewed-on: https://code.wireshark.org/review/4186 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-13http2: C90 doesn't permit anonymous structs or unionsEvan Huus1-13/+13
Change-Id: I88d048e4012109957a0b5e7a2480faed9fbe9cc4 Reviewed-on: https://code.wireshark.org/review/3565 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-13http2: Add additional header decoding informationTatsuhiro Tsujikawa1-11/+250
This patch adds additional header decoding information, such as header encoding representation, including header table size update (HPACK draft-09, section 7). Previously when user clicks the decoded header info, it highlights wrong byte sequence in compressed pane. This patch fixes this and now clicking header will highlight the byte sequence it was decoded from. Change-Id: I611a34edef31640c59a1f8bbc26db1c42eb16ce2 Reviewed-on: https://code.wireshark.org/review/3407 Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-03http2: Update to h2-14Tatsuhiro Tsujikawa1-49/+80
* Expand frame length field to 24 bits * Add new SETTINGS: - SETTINGS_MAX_FRAME_SIZE - SETTINGS_MAX_HEADER_LIST_SIZE * Update libnghttp2 HPACK * Remove END_SEGMENT flag Change-Id: I5906322ad5a4d61c963ed95fada9415e66e146da Reviewed-on: https://code.wireshark.org/review/3357 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-08-03HTTP2: Add a preference to enable/disable HTTP2 (weak) heuristicsAlexis La Goutte1-0/+24
By default, the heuristic is disabled Change-Id: I26ef23e8b153576a4fabd2e3324e830756e64bb7 Ping-Bug:10335 Ping-Bug:10310 Reviewed-on: https://code.wireshark.org/review/3350 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-16Fix assertion error when no header field was decompressedTatsuhiro Tsujikawa1-0/+4
bug: 10279 Change-Id: Ibf88b1622318692ccf3904aede5d964e6028bdc7 Reviewed-on: https://code.wireshark.org/review/3087 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-09Moved nghttp2 to epanGraham Bloice1-1/+1
Cleaned up nghttp2 build Change-Id: I9f7adc12936155e0ffc01ec825b5aff95279f97d Reviewed-on: https://code.wireshark.org/review/2937 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-08Enhance HTTP/2 HPACK header decompression handlingTatsuhiro Tsujikawa1-111/+255
Previously we just call HPACK decompressor when dessecting packets. This is fine for the first linear scan. But later same packet may be dissected more than once and their header block data will be fed into decompressor again. This makes header compression context out-of-sync because HPACK decompressor only works when data is fed linearly. This change fixes this issue by caching decompressed headers in the first linear scan. On random packet dissecting, they are just looked up. This change adds support of changing header table size by inspecting SETTINGS frame and tracking its SETTINGS ACK. Change-Id: I9c75c67f8677063e443f9b131740f3ee94ff8a63 Reviewed-on: https://code.wireshark.org/review/2616 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>