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

fix fetchParams func #301

Closed
wants to merge 1 commit into from
Closed

fix fetchParams func #301

wants to merge 1 commit into from

Conversation

dogancanbakir
Copy link
Member

Closes #300

Copy link
Member

@tarunKoyalwar tarunKoyalwar left a comment

Choose a reason for hiding this comment

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

suggested alternative approach

Comment on lines 214 to 225
return
} else {
encodedParams := u.Original[index+1:]
if encodedParams == "" {
return
}
u.Params.Decode(encodedParams)
u.Original = u.Original[:index]
}
u.Update()
}

Copy link
Member

Choose a reason for hiding this comment

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

@dogancanbakir if encodedParams is empty and we return early then ? will be considered as part of path and it might break MergePath when in unsafe mode. since the goal of fetchParams is to remove parameters completely from url for furthur processing . we can instead add new parameter in orderParam like IncludePrefix for this special case

type OrderedParams struct {
and reflect the same in (OrderedParams).Encode() while constructing QueryParamString in url and this will be reflected in all downstream dependencies

@tarunKoyalwar tarunKoyalwar deleted the fix_fetchparams_func branch January 4, 2024 16:47
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.

fetchParams func removes trailing ?
2 participants