Skip to content
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

add a query string helper from byte cursor directly #1080

Merged
merged 4 commits into from
Dec 28, 2023
Merged

Conversation

TingDaoK
Copy link
Contributor

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.

@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (80f21b3) 83.30% compared to head (7bde526) 83.31%.

Files Patch % Lines
source/uri.c 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1080      +/-   ##
==========================================
+ Coverage   83.30%   83.31%   +0.01%     
==========================================
  Files          56       56              
  Lines        5804     5808       +4     
==========================================
+ Hits         4835     4839       +4     
  Misses        969      969              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

source/uri.c Outdated
bool aws_uri_query_string_next_param(const struct aws_uri *uri, struct aws_uri_param *param) {
return aws_query_string_next_param(uri->query_string, param);
}

int aws_uri_query_string_params(const struct aws_uri *uri, struct aws_array_list *out_params) {
struct aws_uri_param param;
Copy link
Contributor

Choose a reason for hiding this comment

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

if possible, just have aws_uri_query_string_params() call into aws_query_string_params()

* 2) Blank entries are skipped.
* Example: The only param in query string "&&a=b" is key="a" value="b"
*/
AWS_COMMON_API bool aws_query_string_next_param(struct aws_byte_cursor query_string, struct aws_uri_param *param);
Copy link
Contributor

Choose a reason for hiding this comment

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

in that other PR how do you plan to go from path_and_query to just query? Does that necessitate another helper?

@TingDaoK TingDaoK marked this pull request as ready for review December 27, 2023 22:40
Copy link
Contributor

@graebm graebm left a comment

Choose a reason for hiding this comment

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

fix & ship

include/aws/common/uri.h Outdated Show resolved Hide resolved
@TingDaoK TingDaoK merged commit b7e04ca into main Dec 28, 2023
103 checks passed
@TingDaoK TingDaoK deleted the parse-path-query branch December 28, 2023 22:45
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.

3 participants