-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpClient] Fix Copy as curl with base uri #46665
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
Conversation
$url = self::mergeQueryString($trace['url'], $trace['options']['query'] ?? [], true); | ||
$url = implode('', self::resolveUrl( | ||
self::parseUrl($trace['url'], $trace['options']['query'] ?? []), | ||
isset($trace['options']['base_uri']) ? self::parseUrl($trace['options']['base_uri']) : null |
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 we should parse $debug instead because options won't always contain the base_uri, when default options are used.
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.
@nicolas-grekas The problem is that $debug
doesn't contain information about which protocol was used in the request, we would still need to get that from $trace['uri']
or $trace['options']['base_uri']
if the former is relative. I'll look into it some more just to be sure I didn't miss anything.
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.
@nicolas-grekas Done
b5c272e
to
84fc01e
Compare
84fc01e
to
12e40a0
Compare
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 went with an updated implementation that leverages an original_url
info)
Thank you @HypeMC. |
Fixes Copy as curl when
base_uri
is used.