GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Get rid of all custom URL encoding · Issue #1356 · python-gitlab/python-gitlab

Get rid of all custom URL encoding #1356

New issue
Copy link
New issue
Copy link
Closed
#1816
Closed
Get rid of all custom URL encoding#1356
#1816
Copy link

Description

@nejch
nejch
opened on Mar 2, 2021
Issue body actions

See also #1336, #1080, #1079.

On the other hand, need to check #1006 and the current state of

python-gitlab/gitlab/client.py

Lines 513 to 524 in 96d2805

# Requests assumes that `.` should not be encoded as %2E and will make
# changes to urls using this encoding. Using a prepped request we can
# get the desired behavior.
# The Requests behavior is right but it seems that web servers don't
# always agree with this decision (this is the case with a default
# gitlab installation)
req = requests.Request(verb, url, json=json, data=data, params=params, **opts)
prepped = self.session.prepare_request(req)
prepped.url = utils.sanitized_url(prepped.url)
settings = self.session.merge_environment_settings(
prepped.url, {}, streamed, verify, None
)

If proxies handle it differently maybe an additional arg for e.g. encode_xyz=True might help.


gitlab/utils.py:    return id.replace("/", "%2F").replace("#", "%23")
gitlab/utils.py:        return value.replace("/", "%2F")
gitlab/utils.py:    new_path = parsed.path.replace(".", "%2E")
gitlab/v4/objects/branches.py:        id = self.get_id().replace("/", "%2F")
gitlab/v4/objects/branches.py:        id = self.get_id().replace("/", "%2F")
gitlab/v4/objects/features.py:        path = "%s/%s" % (self.path, name.replace("/", "%2F"))
gitlab/v4/objects/files.py:        self.file_path = self.file_path.replace("/", "%2F")
gitlab/v4/objects/files.py:        file_path = self.get_id().replace("/", "%2F")
gitlab/v4/objects/files.py:        file_path = file_path.replace("/", "%2F")
gitlab/v4/objects/files.py:        file_path = new_data.pop("file_path").replace("/", "%2F")
gitlab/v4/objects/files.py:        file_path = file_path.replace("/", "%2F")
gitlab/v4/objects/files.py:        path = "%s/%s" % (self.path, file_path.replace("/", "%2F"))
gitlab/v4/objects/files.py:        file_path = file_path.replace("/", "%2F").replace(".", "%2E")
gitlab/v4/objects/files.py:        file_path = file_path.replace("/", "%2F").replace(".", "%2E")
gitlab/v4/objects/repositories.py:        submodule = submodule.replace("/", "%2F")  # .replace('.', '%2E')
gitlab/v4/objects/tags.py:        id = self.get_id().replace("/", "%2F")
Reacted by Max Wittig, Chris Peterson, John Villalovos and darkdragon-001

Activity

  1. oux commented on Jul 8, 2021

    @oux
    oux
    on Jul 8, 2021
    More actions

    Hi, I made a pullrequest to fix the lazy object deletion (fix #1494): #1541
    Let me know if you need any action from me.

  2. JohnVillalovos
    added 6 commits that reference this issue on Dec 19, 2021

    chore: stop encoding '.' to '%2E'

    f6066c7

    chore: stop encoding '.' to '%2E'

    ca0e183

    chore: stop encoding '.' to '%2E'

    d7893c1

    chore: stop encoding '.' to '%2E'

    39155df

    fix: stop encoding '.' to '%2E'

    daa2e65

    fix: stop encoding '.' to '%2E'

    702e41d
  3. JohnVillalovos
    added 7 commits that reference this issue on Jan 8, 2022

    chore: remove custom URL encoding

    This issue will close once commit 8c17afa is merged into the 'main' branch.
    8c17afa

    chore: remove custom URL encoding

    This issue will close once commit 2a209c3 is merged into the 'main' branch.
    2a209c3

    chore: remove custom URL encoding

    This issue will close once commit d99848c is merged into the 'main' branch.
    d99848c

    chore: remove custom URL encoding

    This issue will close once commit 96e04a5 is merged into the 'main' branch.
    96e04a5

    chore: remove custom URL encoding

    This issue will close once commit ca85f93 is merged into the 'main' branch.
    ca85f93

    chore: remove custom URL encoding

    This issue will close once commit 94dd1e0 is merged into the 'main' branch.
    94dd1e0

    fix: remove custom URL encoding

    This issue will close once commit 3d49e5e is merged into the 'main' branch.
    3d49e5e
  4. nejch
    closed this as completedin #1816on Jan 9, 2022
  5. github-actions
    locked as resolved and limited conversation to collaborators on Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.