Closed cdeler closed 1 year ago
Question for some context: if a client sends Cookie headers that are already split does h2 combine them somewhere or will the split header fields be encoded as expected?
@sethmlarson I asked myself the same thing, and found this: https://github.com/python-hyper/h2/blob/c7f967d77a6f32be374e33adca195e65a00afb63/src/h2/utilities.py#L583-L603
as a first step to a review, I fixed our project CI (which was a challenge by itself). https://github.com/python-hyper/h2/pull/1276
I don't see any obvious issues with the code itself - though I still need time to think and read through the spec and implications. Happy to hear other thoughts in the mean time!
@cdeler you said:
some users require to have an ability and to add an ability to split
I don't see an "option" in your PR - its "always on"? Or do you think this should be the new one-and-only way to handle cookies?
Hello @Kriechi
Or do you think this should be the new one-and-only way to handle cookies?
I don't think so (because RFC says "may") :-) , so that I updated the PR adding split_outbound_cookies
flag to the h2.config.H2Configuration
(False
by default)
LGTM!
Hello, seems this change was not covered in 4.1.0 version?
According to the rfc7540#section-8.1.2.5,
The
h2
framework is used by thehttpx
client, and some users require to have an ability to send cookies via separate headers to follow http2 practice. Or at least to make this option configurable (more: encode/httpx#1214).As
h2
decides how to properly send data over the transport,h2
seems to be a right place to add an ability to split the cookie headers. Also the opposite functionality is added to the inbound cookies processing (ref).Notes:
I have concerns about my PR, may be you can help me with suggestings: