Skip to content

urlapi: add CURLU_NO_GUESS_SCHEME#13616

Closed
bagder wants to merge 2 commits intomasterfrom
bagder/urlapi-no-guessed-scheme
Closed

urlapi: add CURLU_NO_GUESS_SCHEME#13616
bagder wants to merge 2 commits intomasterfrom
bagder/urlapi-no-guessed-scheme

Conversation

@bagder
Copy link
Member

@bagder bagder commented May 13, 2024

Used for extracting:

  • when used asking for a scheme, it will return CURLUE_NO_SCHEME if the stored information was a guess

  • when used asking for a URL, the URL is returned without a scheme, like when previously given to the URL parser when it was asked to guess

  • as soon as the scheme is set explicitly, it is no longer internally marked as guessed

The idea being:

  1. allow a user to figure out if a URL's scheme was set as a result of guessing

  2. extract the URL without a guessed scheme

  3. this makes it work similar to how we already deal with port numbers

Extend test 1560 to verify.

@icing
Copy link
Contributor

icing commented May 13, 2024

CURLU_CLUELESS.

@bagder bagder added feature-window A merge of this requires an open feature window labels May 13, 2024
Used for extracting:

- when used asking for a scheme, it will return CURLUE_NO_SCHEME if the
  stored information was a guess

- when used asking for a URL, the URL is returned without a scheme, like
  when previously given to the URL parser when it was asked to guess

- as soon as the scheme is set explicitly, it is no longer internally
  marked as guessed

The idea being:

1. allow a user to figure out if a URL's scheme was set as a result of
  guessing

2. extract the URL without a guessed scheme

3. this makes it work similar to how we already deal with port numbers

Extend test 1560 to verify.

Closes #13616
@bagder bagder force-pushed the bagder/urlapi-no-guessed-scheme branch from 49ec9a4 to acfdf96 Compare June 1, 2024 10:04
@bagder bagder closed this in 655d44d Jun 1, 2024
@bagder bagder deleted the bagder/urlapi-no-guessed-scheme branch June 1, 2024 21:52
vszakats added a commit to vszakats/hb that referenced this pull request Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature-window A merge of this requires an open feature window libcurl API tests URL

Development

Successfully merging this pull request may close these issues.

2 participants