Skip to content

Commit

Permalink
adapt to aws_future changes (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
graebm authored Jun 5, 2023
1 parent dbceb17 commit 27efc27
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/aws/http/request_response.h
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ void aws_http_message_set_body_stream(struct aws_http_message *message, struct a
/**
* aws_future<aws_http_message*>
*/
AWS_DECLARE_FUTURE_T_POINTER_WITH_RELEASE(aws_future_http_message, struct aws_http_message, aws_http_message_release)
AWS_FUTURE_T_POINTER_WITH_RELEASE_DECLARATION(aws_future_http_message, struct aws_http_message, AWS_HTTP_API)

/**
* Submit a chunk of data to be sent on an HTTP/1.1 stream.
Expand Down
12 changes: 9 additions & 3 deletions source/request_response.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,11 @@ int aws_http_message_get_header(
return aws_http_headers_get_index(message->headers, index, out_header);
}

AWS_FUTURE_T_POINTER_WITH_RELEASE_IMPLEMENTATION(
aws_future_http_message,
struct aws_http_message,
aws_http_message_release)

struct aws_http_stream *aws_http_connection_make_request(
struct aws_http_connection *client_connection,
const struct aws_http_make_request_options *options) {
Expand Down Expand Up @@ -952,8 +957,8 @@ struct aws_http_message *aws_http2_message_new_from_http1(
scheme_cursor.ptr);

/**
* An intermediary that forwards a request over HTTP/2 MUST construct an ":authority" pseudo-header field using
* the authority information from the control data of the original request. (RFC=9113 8.3.1)
* An intermediary that forwards a request over HTTP/2 MUST construct an ":authority" pseudo-header field
* using the authority information from the control data of the original request. (RFC=9113 8.3.1)
*/
struct aws_byte_cursor host_value;
AWS_ZERO_STRUCT(host_value);
Expand All @@ -970,7 +975,8 @@ struct aws_http_message *aws_http2_message_new_from_http1(
(int)host_value.len,
host_value.ptr);
}
/* TODO: If the host headers is missing, the target URI could be the other source of the authority information
/* TODO: If the host headers is missing, the target URI could be the other source of the authority
* information
*/

struct aws_byte_cursor path_cursor;
Expand Down

0 comments on commit 27efc27

Please sign in to comment.