Title: URL-encoded kwargs are infinitely duplicated in query params (v3.7.0 regression for arrays) · Issue #2218 · python-gitlab/python-gitlab · GitHub
Open Graph Title: URL-encoded kwargs are infinitely duplicated in query params (v3.7.0 regression for arrays) · Issue #2218 · python-gitlab/python-gitlab
X Title: URL-encoded kwargs are infinitely duplicated in query params (v3.7.0 regression for arrays) · Issue #2218 · python-gitlab/python-gitlab
Description: Description of the problem, including code/CLI snippet With #1699 we added array params for query params in GET requests. But GitLab also returns that param, URL-encoded, in the next URL which we then follow in listing endpoints. Because...
Open Graph Description: Description of the problem, including code/CLI snippet With #1699 we added array params for query params in GET requests. But GitLab also returns that param, URL-encoded, in the next URL which we t...
X Description: Description of the problem, including code/CLI snippet With #1699 we added array params for query params in GET requests. But GitLab also returns that param, URL-encoded, in the next URL which we t...
Opengraph URL: https://github.com/python-gitlab/python-gitlab/issues/2218
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"URL-encoded kwargs are infinitely duplicated in query params (v3.7.0 regression for arrays)","articleBody":"## Description of the problem, including code/CLI snippet\r\n\r\nWith #1699 we added array params for query params in GET requests. But GitLab also returns that param, URL-encoded, in the `next` URL which we then follow in listing endpoints. Because one is URL-encoded and the other isn't, the param gets added at the end of the query again. With `list()` calls this happens over and over again and causes 502 due to super long query strings eventually.\r\n\r\nminimal reproduction:\r\n\r\n```python\r\nimport gitlab\r\n\r\ngl = gitlab.Gitlab()\r\ngl.enable_debug()\r\n\r\nprojects = gl.projects.list(topics=[\"python\"], per_page=1, iterator=True)\r\n\r\nfor project in projects:\r\n # watch the `send` URL grow continuously until triggering 502\r\n pass\r\n\r\n```\r\n\r\n## Expected Behavior\r\n\r\nIf a kwarg/param (URL-encoded or not) that we provide is already in the provided URL, it should never be duplicated when we construct the final request URL.\r\n\r\n## Actual Behavior\r\n\r\n`http_request()` and requests can't tell if our kwargs match those already in the URL params and they get duplicated to oblivion, causing 502 once the URL query is too long for the server.\r\n\r\n## Specifications\r\n\r\n - python-gitlab version: v3.7.0\r\n - API version you are using (v3/v4): v4\r\n - Gitlab server version (or gitlab.com): all\r\n","author":{"url":"https://github.com/nejch","@type":"Person","name":"nejch"},"datePublished":"2022-08-04T13:31:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2218/python-gitlab/issues/2218"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9c48082c-ce86-576c-4fd5-0222800f4d5f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 84C2:CF072:15D50FD:1E8D1E5:69726FC3 |
| html-safe-nonce | a88ace7926fc540b1b163b4ad252530a5b6cbf82e92caeb84565e3c35356dab9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NEMyOkNGMDcyOjE1RDUwRkQ6MUU4RDFFNTo2OTcyNkZDMyIsInZpc2l0b3JfaWQiOiI4ODk4NjM3MTMzNDAwNjY2MDUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0533f2b0731096794dfa839cf97d7209a5d1d2cee3200fbcbf436c808b96202f |
| hovercard-subject-tag | issue:1328641078 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-gitlab/python-gitlab/2218/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f93b8f04191a2f873bea7f84b824c862d4d5494613cf7b56ee67320c56f2c0e4/python-gitlab/python-gitlab/issues/2218 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f93b8f04191a2f873bea7f84b824c862d4d5494613cf7b56ee67320c56f2c0e4/python-gitlab/python-gitlab/issues/2218 |
| og:image:alt | Description of the problem, including code/CLI snippet With #1699 we added array params for query params in GET requests. But GitLab also returns that param, URL-encoded, in the next URL which we t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nejch |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3be355d8ea7ca74c4edec03a70ecaa8211862649e90886d88a4db13e6778e4c3 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-gitlab/python-gitlab git https://github.com/python-gitlab/python-gitlab.git |
| octolytics-dimension-user_id | 28886265 |
| octolytics-dimension-user_login | python-gitlab |
| octolytics-dimension-repository_id | 8077625 |
| octolytics-dimension-repository_nwo | python-gitlab/python-gitlab |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 8077625 |
| octolytics-dimension-repository_network_root_nwo | python-gitlab/python-gitlab |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4ae5b6c1e16519c3e3ad37a388f7cca2192a79a8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width