Internal server error on collection COPY with Depth: infinity #9
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sciactive/nephele#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello!
First of all, I wanna say THANK YOU for this great library, it saved me a lot of work. If you configure Sponsor button I can give you a tip 😄
I encountered a problem with COPY method when trying to use it on collection with
Depth: infinityheader. I get500 Internal server error, caused because incorrect destination URL being created.The exact error message that I extracted with debugger is:
With the most important thing noticible here:
Look at the
base- protocol includes double::character, which causes an error.I did not dive deep into this, but if we take a look at this piece of code, we can see the cause:
Destination variable is of
URLtype. According to this docs on MDN theprotocolproperty returns protocol name with a colon behind it, for examplehttp:.So the result is, as you can see in the error message provided above,
baseUrlwith value"http:://localhost"provided into URL constructor.I can create a PR with a fix, but first I need a green light from you. It seems like a small and easy fix, but it may break some functionalities that I do not even realize that exist.
The change proposed by me is to remove additional colon:
Thank you for taking time to look at this issue.
Have a good day!
Following script fixes the issue by replacing problematic line with fixed one:
We are using it for a month and everything works as expected :)
Wow! Thank you for the detailed report and the fix. I'll go ahead and merge this and make a new release. And thank you for the compliments. I'll set up a sponsor button. :)
This project has been on the back burner for a month, since I've been updating all my other projects to the new version of Svelte, but I'll be focusing on it again soon.
This is now fixed in release 1.0.0-alpha.62.