Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
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 to84fc01eCompare84fc01e to12e40a0Compare
nicolas-grekas left a comment
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 anoriginal_url info)
nicolas-grekas commentedJun 19, 2022
Thank you@HypeMC. |
Fixes Copy as curl when
base_uriis used.