Skip to content

Conversation

@TingDaoK
Copy link
Contributor

@TingDaoK TingDaoK commented Apr 3, 2020

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@TingDaoK TingDaoK requested a review from a team April 3, 2020 22:30
return AWS_OP_ERR;
}

if (decoder->header_block_in_progress.cookies.len) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't flush the cookie if the header block is malformed. Once we detect the header block is malformed we stop delivering individual headers.

That behavior would be more clear if we also moved the s_flush_pseudoheaders() call inside the if (!malformed) block. I thought it was simpler-looking to have that function do its own check, but it's obviously more confusing then helpful

return AWS_OP_SUCCESS;
}
struct aws_http_header concatenated_cookie;
concatenated_cookie.name = aws_byte_cursor_from_c_str("cookie");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trivial: = AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("cookie");
compile-time strlen()

@TingDaoK TingDaoK merged commit 7f65818 into master Apr 7, 2020
@TingDaoK TingDaoK deleted the h2-cookie-header-field branch April 7, 2020 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants