Skip to content
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

add detection of explicit vsi-prefix in URI-address #59586

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

notguiltyspark
Copy link
Contributor

Description

As of now, process of adding vector layer via URI-address with already-present prefix does not detect this prefix, which results in its prepending to the final string, which leads to the error in query.

This PR fixes it, scanning input uri-address beforehand and checking if it can detect prefixes from the usual protocols list.

vsicurl_prefix

@github-actions github-actions bot added this to the 3.42.0 milestone Nov 25, 2024
Copy link

github-actions bot commented Nov 25, 2024

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 7f7b6d5)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 7f7b6d5)

{
uri.prepend( QStringLiteral( "http://" ) );
// If no protocol is provided in the URL, default to HTTP
if ( !uri.startsWith( "http://" ) && !uri.startsWith( "https://" ) && !uri.startsWith( "ftp://" ) )
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if ( !uri.startsWith( "http://" ) && !uri.startsWith( "https://" ) && !uri.startsWith( "ftp://" ) )
if ( !uri.startsWith( QLatin1String("http://") ) && !uri.startsWith( QLatin1String("https://") ) && !uri.startsWith( QLatin1String("ftp://") ) )

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