René's URL Explorer Experiment


Title: Sentry's http putrequest override breaks if url is None, while native http does not · Issue #1678 · getsentry/sentry-python · GitHub

Open Graph Title: Sentry's http putrequest override breaks if url is None, while native http does not · Issue #1678 · getsentry/sentry-python

X Title: Sentry's http putrequest override breaks if url is None, while native http does not · Issue #1678 · getsentry/sentry-python

Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.9.10 Steps to Reproduce Example code import sentry_sdk from http.client import HTTPConnection print("sending reqeust with None url before sentry_sdk.init") HTTPConnection("httpbin....

Open Graph Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.9.10 Steps to Reproduce Example code import sentry_sdk from http.client import HTTPConnection print("sending reqeust with None url before se...

X Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.9.10 Steps to Reproduce Example code import sentry_sdk from http.client import HTTPConnection print("sending reqeust with None url befo...

Opengraph URL: https://github.com/getsentry/sentry-python/issues/1678

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sentry's http putrequest override breaks if url is None, while native http does not","articleBody":"### How do you use Sentry?\r\n\r\nSentry Saas (sentry.io)\r\n\r\n### Version\r\n\r\n1.9.10\r\n\r\n### Steps to Reproduce\r\n\r\nExample code\r\n\r\n```\r\nimport sentry_sdk\r\nfrom http.client import HTTPConnection\r\n\r\nprint(\"sending reqeust with None url before sentry_sdk.init\")\r\nHTTPConnection(\"httpbin.org\", port=443).putrequest(\"POST\", None)\r\nprint(\"OK\")\r\n\r\nsentry_sdk.init(dsn=\"\")\r\nprint(\"sending reqeust with None url after sentry_sdk.init\")\r\nHTTPConnection(\"httpbin.org\", port=443).putrequest(\"POST\", None)\r\nprint(\"OK\")\r\n```\r\n\r\nOutput:\r\n\r\n```\r\nsending reqeust with None url before sentry_sdk.init\r\nOK\r\nsending reqeust with None url after sentry_sdk.init\r\nTraceback (most recent call last):\r\n  File \"/Users/cpak/projects/sentry-httplib-bug/main.py\", line 10, in \u003cmodule>\r\n    HTTPConnection(\"httpbin.org\", port=443).putrequest(\"POST\", None)\r\n  File \"/Users/cpak/projects/sentry-httplib-bug/.venv/lib/python3.10/site-packages/sentry_sdk/integrations/stdlib.py\", line 73, in putrequest\r\n    if not real_url.startswith((\"http://\", \"https://\")):\r\nAttributeError: 'NoneType' object has no attribute 'startswith'\r\n```\r\n\r\n\r\n### Expected Result\r\n\r\nI expect Sentry's http instrumentation to not alter the behavior of the underlying code.\r\n\r\nI ran into this issue because a package I'm using ([azure-data-tables](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables)) apparently tries to send requests with a `None` url, i.e. I don't really have any control over this. It worked locally but not on our remote servers, which turned out to be because we have Sentry running on those servers 😅 \r\n\r\n### Actual Result\r\n\r\nAn `AttributeError: 'NoneType' object has no attribute 'startswith'` is raised.\r\n\r\nFWIW the native implementation has this line\r\n```\r\nurl = url or '/'\r\n```\r\n","author":{"url":"https://github.com/cpak","@type":"Person","name":"cpak"},"datePublished":"2022-10-13T15:01:58Z","url":"https://github.com/getsentry/sentry-python/issues/1678"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ee42a9be-a4cd-e10d-c1fd-1c16b64adb22
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD998:1E3D3D:339917:478B7D:6B008AD7
html-safe-nonce2b56ebbb92f0e733346ae604c254ff2a5b50649b9945e275cb2e5718cd53f1b9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTk4OjFFM0QzRDozMzk5MTc6NDc4QjdEOjZCMDA4QUQ3IiwidmlzaXRvcl9pZCI6IjQzNTgwMDc3MTk2NjQzMjMyODciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf5a73274e20b3ef835d0999f25345f7038e1628c889394789b6fd30829231fef
hovercard-subject-tagissue:1407963886
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-python/1678/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5959b9861aac85151b86ecf8fbd3113e65666823794e6083700c2fa3f30d4874/getsentry/sentry-python/issues/1678
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5959b9861aac85151b86ecf8fbd3113e65666823794e6083700c2fa3f30d4874/getsentry/sentry-python/issues/1678
og:image:altHow do you use Sentry? Sentry Saas (sentry.io) Version 1.9.10 Steps to Reproduce Example code import sentry_sdk from http.client import HTTPConnection print("sending reqeust with None url before se...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecpak
hostnamegithub.com
expected-hostnamegithub.com
None4d3d8e50f02c1d7bf86d5acfa1d3bfe9366abd6528a6b429eb07a168429d2b61
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id137814779
octolytics-dimension-repository_nwogetsentry/sentry-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id137814779
octolytics-dimension-repository_network_root_nwogetsentry/sentry-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasedb758f8e02b8257935fb03edf81a3e76eb3abd11
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-python/issues/1678#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fissues%2F1678
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fissues%2F1678
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-python
Reloadhttps://github.com/getsentry/sentry-python/issues/1678
Reloadhttps://github.com/getsentry/sentry-python/issues/1678
Reloadhttps://github.com/getsentry/sentry-python/issues/1678
getsentryhttps://github.com/getsentry
sentry-pythonhttps://github.com/getsentry/sentry-python
Codehttps://github.com/getsentry/sentry-python
Issues345 (345)https://github.com/getsentry/sentry-python/issues
Pull requests41 (41)https://github.com/getsentry/sentry-python/pulls
Discussionshttps://github.com/getsentry/sentry-python/discussions
Actionshttps://github.com/getsentry/sentry-python/actions
Security and quality2 (2)https://github.com/getsentry/sentry-python/security
Insightshttps://github.com/getsentry/sentry-python/insights
https://github.com/getsentry/sentry-python
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-python/issues/1678
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-python/issues/1678
#1693https://github.com/getsentry/sentry-python/pull/1693
Sentry's http putrequest override breaks if url is None, while native http does nothttps://github.com/getsentry/sentry-python/issues/1678#top
#1693https://github.com/getsentry/sentry-python/pull/1693
Bughttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Bug%22
https://github.com/cpak
cpakhttps://github.com/cpak
on Oct 13, 2022https://github.com/getsentry/sentry-python/issues/1678#issue-1407963886
azure-data-tableshttps://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables
getsantryhttps://github.com/apps/getsantry
Status: Untriagedhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Status%3A%20Untriaged%22
on Oct 13, 2022https://github.com/getsentry/sentry-python/issues/1678#event-7582305163
cpakhttps://github.com/cpak
on Oct 13, 2022https://github.com/getsentry/sentry-python/issues/1678#event-7582307458
sl0thentr0pyhttps://github.com/sl0thentr0py
bughttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22bug%22
on Oct 13, 2022https://github.com/getsentry/sentry-python/issues/1678#event-7582319094
getsantryhttps://github.com/apps/getsantry
Status: Untriagedhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Status%3A%20Untriaged%22
on Oct 13, 2022https://github.com/getsentry/sentry-python/issues/1678#event-7582319491
sl0thentr0pyhttps://github.com/sl0thentr0py
Status: Untriagedhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Status%3A%20Untriaged%22
Status: Backloghttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Status%3A%20Backlog%22
on Oct 13, 2022https://github.com/getsentry/sentry-python/issues/1678#event-7582319608
getsantryhttps://github.com/apps/getsantry
Status: Untriagedhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Status%3A%20Untriaged%22
on Oct 13, 2022https://github.com/getsentry/sentry-python/issues/1678#event-7582319945
sl0thentr0pyhttps://github.com/sl0thentr0py
Status: Untriagedhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Status%3A%20Untriaged%22
Hacktoberfest 🎃https://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Hacktoberfest%20%F0%9F%8E%83%22
on Oct 13, 2022https://github.com/getsentry/sentry-python/issues/1678#event-7582320275
getsantryhttps://github.com/apps/getsantry
Status: Untriagedhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Status%3A%20Untriaged%22
on Oct 13, 2022https://github.com/getsentry/sentry-python/issues/1678#event-7582320560
sl0thentr0pyhttps://github.com/sl0thentr0py
good first issuehttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
on Oct 13, 2022https://github.com/getsentry/sentry-python/issues/1678#event-7582323758
MattFlowerhttps://github.com/MattFlower
on Oct 19, 2022https://github.com/getsentry/sentry-python/issues/1678#event-7624689038
fix(integrations): Fix http putrequest when url is Nonehttps://github.com/MattFlower/sentry-python/commit/22f435da4ac6d309b468d4c282a5b9bae47caa78
https://docs.github.com/articles/closing-issues-via-commit-messages
22f435dhttps://github.com/MattFlower/sentry-python/commit/22f435da4ac6d309b468d4c282a5b9bae47caa78
fix(integrations): Fix http putrequest when url is Nonehttps://github.com/MattFlower/sentry-python/commit/20dcf7efae676ca29dd606f8a43738adad68a2fb
https://docs.github.com/articles/closing-issues-via-commit-messages
20dcf7ehttps://github.com/MattFlower/sentry-python/commit/20dcf7efae676ca29dd606f8a43738adad68a2fb
antonpirkerhttps://github.com/antonpirker
completedhttps://github.com/getsentry/sentry-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#1693https://github.com/getsentry/sentry-python/pull/1693
on Oct 20, 2022https://github.com/getsentry/sentry-python/issues/1678#event-7628096666
antonpirkerhttps://github.com/antonpirker
on Oct 20, 2022https://github.com/getsentry/sentry-python/issues/1678#event-7628096760
fix(integrations): Fix http putrequest when url is None (#1693)https://github.com/getsentry/sentry-python/commit/c471331e524a72248e20c3f166faec8fb26d727c
#1693https://github.com/getsentry/sentry-python/pull/1693
https://docs.github.com/articles/closing-issues-via-commit-messages
c471331https://github.com/getsentry/sentry-python/commit/c471331e524a72248e20c3f166faec8fb26d727c
stephanie-andersonhttps://github.com/stephanie-anderson
Type: Bughttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Type%3A%20Bug%22
on Nov 21, 2024https://github.com/getsentry/sentry-python/issues/1678#event-15380687749
Bughttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Bug%22
on Aug 13, 2025https://github.com/getsentry/sentry-python/issues/1678#event-19125052964
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-python/issues/1678
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-python/issues/1678
Bughttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.