-
Notifications
You must be signed in to change notification settings - Fork 49
http2 headers #330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http2 headers #330
Conversation
include/aws/http/request_response.h
Outdated
| * TODO: (Maybe more, connection-specific header will be removed, etc...) | ||
| */ | ||
| AWS_HTTP_API | ||
| struct aws_http_message *aws_http2_message_new_from_http1(struct aws_http_message *http1_msg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
until we have reference counting on input-streams, this is dangerous
it's ok if you make this private
OR JUST ADD REFERENCE COUNTING TO INPUT_STREAMS!!! WOOO!
This reverts commit 7b0012b.
source/request_response.c
Outdated
|
|
||
| int aws_http_headers_add_header(struct aws_http_headers *headers, const struct aws_http_header *header) { | ||
| /* Add pesudo headers to the front and not checking any violation until we send the header to the wire */ | ||
| bool pesudo = aws_strutil_is_http_pseudo_header_name(header->name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pesudo -> pseudo
source/request_response.c
Outdated
| if (pesudo && aws_http_headers_count(headers)) { | ||
| struct aws_http_header last_header; | ||
| AWS_ZERO_STRUCT(last_header); | ||
| if (aws_http_headers_get_index(headers, aws_http_headers_count(headers) - 1, &last_header)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trivial: don't need to check this error. it can only fail if the range is wrong, and you just checked the range
| } | ||
| front = !aws_strutil_is_http_pseudo_header_name(last_header.name); | ||
| } | ||
| return s_http_headers_add_header_impl(headers, header, front); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is weird but ughghghgh whatever
HTTP2 headers
addwill push the pseudo header to the front of the list when needed (the last header is NOT pseudo header)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.