Skip to content

Prepend slash to path if needed#27

Merged
kravets-levko merged 3 commits into
databricks:masterfrom
kravets-levko:18-prepend-slash-to-path
Jul 12, 2022
Merged

Prepend slash to path if needed#27
kravets-levko merged 3 commits into
databricks:masterfrom
kravets-levko:18-prepend-slash-to-path

Conversation

@kravets-levko
Copy link
Copy Markdown
Contributor

Fixes #18

First commit contains actual change, second one is npm run build (we definitely should get rid of it)

Comment thread dist/connection/auth/PlainHttpAuthentication.js Outdated
yunbodeng-db
yunbodeng-db previously approved these changes Jul 12, 2022
Comment thread lib/DBSQLClient.ts

function prependSlash(str: string): string {
if (str.length > 0 && str.charAt(0) !== '/') {
return `/${str}`;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose there is no trimming business here? Someone has sanitized the path before?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No trimming. Slash is required in path, so we just add it when missing; if it's already there - we do nothing

@moderakh moderakh self-requested a review July 12, 2022 21:32
Copy link
Copy Markdown
Contributor

@moderakh moderakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kravets-levko. LGTM

@kravets-levko kravets-levko merged commit 2cc8b99 into databricks:master Jul 12, 2022
@kravets-levko kravets-levko deleted the 18-prepend-slash-to-path branch July 12, 2022 21:38
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.

server_hostname value for clusters should prepend leading forward slash if missing

3 participants