aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-04-01Cowlib 2.9.12.9.1Loïc Hoguin
2020-03-30Add aliases for cookie parsing in cow_http_hdLoïc Hoguin
2020-03-30Fix some HPACK Huffman decoding failure casesLoïc Hoguin
When EOS is found within the string the decoding must fail. When the final padding is > 7 bit in length the decoding must fail as well.
2020-03-25Cowlib 2.9.02.9.0Loïc Hoguin
2020-03-19Document the new cow_cookie functionsLoïc Hoguin
2020-03-11Add cow_cookie:cookie/1Loïc Hoguin
2020-03-06Add cow_cookie:parse_set_cookie/1Loïc Hoguin
Also do minor fixes to cow_cookie:parse_cookie/1. There is a potential incompatibility from these changes, because now a header "Cookie: foo" will be translated to a cookie with an empty name and value "foo", instead of cookie name "foo" and empty value. Also cookie names starting with $ are no longer ignored. These fixes are necessary for the cookies test suite from Web platform tests to work, and match the upcoming cookie RFC.
2020-02-27Clarify error when expecting a SETTINGS frame in HTTP/2 prefaceLoïc Hoguin
The error was appropriate for server mode, but not for client mode, because the server does not send the preface sequence.
2020-01-06Use a map for streams in cow_http2_machineLoïc Hoguin
2019-12-31Add sponsor link to the READMELoïc Hoguin
2019-12-31Fix sending trailers when there are data frames in queueTony Han
2019-12-29HPACK: Fix inline integer decodingsLoïc Hoguin
There's no shift to be done for the first value.
2019-12-28Freeze the structured header tests to a particular commitLoïc Hoguin
Since the spec is still evolving quite a bit and we are following draft numbers (and not the editor's draft) we should use the test suite from that draft.
2019-12-27HPACK: Turn off Dialyzer warning about improper listsLoïc Hoguin
2019-12-27HPACK decode: decode integers directly to avoid copying binariesLoïc Hoguin
2019-12-27HPACK decode: don't try to drop entries when increasing sizeLoïc Hoguin
2019-12-27HPACK encoding now produces a more compact resultLoïc Hoguin
This in turn leads to a small performance improvement.
2019-12-26Fix Proper tests following cow_hpack changesLoïc Hoguin
2019-12-26HPACK encode shouldn't maps:get(huffman...) for every stringLoïc Hoguin
2019-12-26Use binary append instead of lists:reverseLoïc Hoguin
2019-12-26Remove unused cow_hpack:decode/3 Opts argumentLoïc Hoguin
2019-12-26HPACK encode: conditionally call an iolist_to_binaryLoïc Hoguin
This provides a small but noticeable improvement so it's probably worth doing.
2019-12-25Fix typo in commentLoïc Hoguin
2019-12-25Optimize HPACK Huffman decodingLoïc Hoguin
The previous naive implementation ended up not benefitting from binary match context reuse because it was matching on bit boundaries (and not bytes). This new implementation matches a byte at a time. The result is almost twice faster when decoding the examples from the HPACK RFC (before/after): cow_hpack:decode_huffman in 0.250666s cow_hpack:decode_huffman in 0.133743s
2019-12-19Accept iodata() when building linksLoïc Hoguin
2019-12-19Escape attribute values when building link headersLoïc Hoguin
2019-12-18Rename cow_uri_templates to cow_uri_templateLoïc Hoguin
Fits better since we are dealing with a single template at a time.
2019-12-18Add cow_uri_templatesLoïc Hoguin
Implements RFC6570 level 4.
2019-11-25Reorganize cow_http_hdLoïc Hoguin
2019-11-25Add structured headers, variants and variant-key buildingLoïc Hoguin
2019-11-23Add cow_http_struct_hdLoïc Hoguin
Implements draft-ietf-httpbis-header-structure-14.
2019-11-23Add cow_link implementing RFC8288 (link header)Loïc Hoguin
2019-11-23Require Erlang/OTP 21+Loïc Hoguin
2019-10-10Add cow_http2_machine:is_lingering_stream/22.8.0Loïc Hoguin
2019-10-10Cowlib 2.8.0Loïc Hoguin
2019-10-10Fix cow_http_te:decode_ret() typeLoïc Hoguin
2019-10-10Fix cookie_opts() type in code and documentationLoïc Hoguin
It's supposed to be a map, not a proplist.
2019-10-05Allow disabling the UTF-8 Websocket text frames validationLoïc Hoguin
2019-10-05Make sure ensure_window doesn't crash if stream is closedLoïc Hoguin
2019-10-04Add manual for cow_cookieLoïc Hoguin
2019-10-03Remove HTTP/1.1 connection headers in HTTP/2 messagesLoïc Hoguin
2019-10-01Don't return lingering_data tuples anymoreLoïc Hoguin
The better solution is to use the ensure_window functions, if updating the window is necessary.
2019-10-01Add HTTP/2 option stream_window_data_thresholdLoïc Hoguin
This controls how large the window should be before we are willing to send data. We of course always send data when the data we need to send is lower than the current window. This is both an optimization and a fix for the data dribble denial of service vulnerability (CVE-2019-9511).
2019-10-01Add cow_http2_machine:get_connection_local_buffer_size/1Loïc Hoguin
The function can be used to restrict how big all the buffers of a single connection can get.
2019-10-01Don't filter HTTP/2 optionsLoïc Hoguin
It's not a big gain and causes issues when forgetting to update the list. Maybe it can be added back again at a later time.
2019-10-01Reject empty HTTP/2 header namesLoïc Hoguin
2019-09-14Add cow_http2_machine:get_stream_local_buffer_size/2Loïc Hoguin
2019-09-12Fix a bug where final empty frames were ignoredLoïc Hoguin
When a final empty frame was queued and the data sent made the window go to 0 and the remote end didn't increase the window anymore, the final empty frame could get stuck in the queue and never sent. Also ensure that we never queue empty non-final data.
2019-09-06Add missing specs to cow_http2_machine:ensure_windowLoïc Hoguin
2019-09-06Authentication scheme is case insensitiveBip Thelin