-
-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Do not modify config.url when using a relative baseURL (resolves #1628) #2391
Merged
felipewmartins
merged 2 commits into
axios:master
from
multicolaure:hotfix/base-url-included-in-config-object-url
Sep 5, 2019
Merged
Do not modify config.url when using a relative baseURL (resolves #1628) #2391
felipewmartins
merged 2 commits into
axios:master
from
multicolaure:hotfix/base-url-included-in-config-object-url
Sep 5, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Because config.url is modified while processing the request when the baseURL is set, it is impossible to perform a retry with the provided config object. Ref axios#1628
As config.url is not modified anymore during the request processing. The request can safely be retried after it failed with the provided config. resolves axios#1628
multicolaure
force-pushed
the
hotfix/base-url-included-in-config-object-url
branch
from
September 5, 2019 09:17
aece92f
to
4f546cc
Compare
multicolaure
changed the title
Do not modify config.url when using a relative baseURL
Do not modify config.url when using a relative baseURL (resolves #1628)
Sep 5, 2019
Thanks @multicolaure!! This closes #1628 |
genie-youn
pushed a commit
to genie-youn/axios
that referenced
this pull request
Sep 27, 2019
…s#1628) (axios#2391) * Adding tests to show config.url mutation Because config.url is modified while processing the request when the baseURL is set, it is impossible to perform a retry with the provided config object. Ref axios#1628 * Fixing url combining without modifying config.url As config.url is not modified anymore during the request processing. The request can safely be retried after it failed with the provided config. resolves axios#1628
@felipewmartins When will this be released? Is there a release schedule we can use for tracking? Thanks |
Bump on the above question - when will a release to include this fix be published on the npm registry? |
This was referenced Jan 7, 2020
This was referenced Apr 4, 2020
This was referenced Apr 7, 2020
Closed
This was referenced Apr 8, 2020
This was referenced Apr 16, 2020
This was referenced Apr 25, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using a relative baseURL, the
config.url
was modified to include thebaseURL
.In case of an error, it was impossible to retry the request with the
config
object, as theurl
was not the same as the original requested URL.See issue #1628 for further details.
This pull request combines the
baseURL
and theurl
in the adapters, leaving untouched theconfig.url
. Request interceptors can modify thebaseURL
, it will still be taken into account (issue #950).