Skip to content

Fix error when create database and query #53

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

Closed
wants to merge 2 commits into from
Closed

Fix error when create database and query #53

wants to merge 2 commits into from

Conversation

zendbit
Copy link

@zendbit zendbit commented Dec 19, 2019

This will happend if passing database name to the flurl with special char for example with /, . , + etc. Will raise exception when requesting.
So we add Uri.EscapeDataString(database) when request using flurl with AppendPathSegment(Uri.EscapeDataString(database))

This will happend if passing database name to the flurl with special char for example with /, . , + etc. Will raise exception when requesting.
So we add Uri.EscapeDataString(database) when request using flurl with AppendPathSegment(Uri.EscapeDataString(database))
@matteobortolazzo
Copy link
Owner

Hi, thanks for the PR,
why not just escape at the root?
Like in GetDatabase, CreateDatabaseAsync, DeleteDatabaseAsync?

Once you escape the parameter in those method, the escaped string will be passed town to the rest of the app.

@zendbit
Copy link
Author

zendbit commented Dec 19, 2019

Yeah, I try to escape to the root, but some part will raise error some method will call other method that already escaped.I hope you have better solution for this :D. I just try to fix with the problems.

Thanks for your great couch client.

@matteobortolazzo
Copy link
Owner

I will give a look this evening.
And thanks :)

@zendbit
Copy link
Author

zendbit commented Dec 19, 2019

You are welcome 🥇

@matteobortolazzo
Copy link
Owner

Hi,
I escaped the root and wrote E2E tests for that, it works as expected.
BTW the "." (dot) is not a valid character. (Documentation)

@zendbit
Copy link
Author

zendbit commented Dec 19, 2019

Hi thanks for checking, I will check then on my code 👍

@zendbit
Copy link
Author

zendbit commented Dec 19, 2019

Hi,
I escaped the root and wrote E2E tests for that, it works as expected.
BTW the "." (dot) is not a valid character. (Documentation)

Hi,
Can you commit the example into the E2E test or share the example in this discussion please? 💯

@zendbit
Copy link
Author

zendbit commented Dec 19, 2019

Hi,
Thanks :-D

@zendbit zendbit closed this Dec 19, 2019
@matteobortolazzo
Copy link
Owner

@zendbit I will create a PR in minutes

@matteobortolazzo
Copy link
Owner

@zendbit #54

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.

2 participants