René's URL Explorer Experiment


Title: HEAD scrapes write a response body when gzip is negotiated · Issue #2665 · prometheus/client_java · GitHub

Open Graph Title: HEAD scrapes write a response body when gzip is negotiated · Issue #2665 · prometheus/client_java

X Title: HEAD scrapes write a response body when gzip is negotiated · Issue #2665 · prometheus/client_java

Description: What happened? A HEAD scrape with Accept-Encoding: gzip enters the compression path in PrometheusScrapeHandler and writes a gzip response body. The non-compressed path already suppresses HEAD bodies. Reproduced on main at 85d9fb0dca9f064...

Open Graph Description: What happened? A HEAD scrape with Accept-Encoding: gzip enters the compression path in PrometheusScrapeHandler and writes a gzip response body. The non-compressed path already suppresses HEAD bodie...

X Description: What happened? A HEAD scrape with Accept-Encoding: gzip enters the compression path in PrometheusScrapeHandler and writes a gzip response body. The non-compressed path already suppresses HEAD bodie...

Opengraph URL: https://github.com/prometheus/client_java/issues/2665

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"HEAD scrapes write a response body when gzip is negotiated","articleBody":"### What happened?\n\nA `HEAD` scrape with `Accept-Encoding: gzip` enters the compression path in `PrometheusScrapeHandler` and writes a gzip response body. The non-compressed path already suppresses HEAD bodies.\n\nReproduced on main at `85d9fb0dca9f064c746470e91b924d253abf8d30` using the existing `PrometheusScrapeHandlerTest` exchange: a HEAD request with gzip produces 69 bytes, where the body must be empty. It also calls `sendHeadersAndGetBody(200, 0)` instead of the no-body length `-1` used by the existing HEAD path.\n\n### Expected behavior\n\nHEAD should return the negotiated headers, including `Content-Type` and `Content-Encoding: gzip`, without constructing a gzip stream or writing response bytes. GET gzip behavior should be unchanged.\n\n### Reproduction\n\nIn the existing handler test fixture:\n\n```java\nTestHttpExchange exchange =\n    new TestHttpExchange(\"HEAD\", null).withHeader(\"Accept-Encoding\", \"gzip\");\nhandler.handleRequest(exchange);\nassertThat(exchange.rawResponseBody.size()).isZero();\n```\n\nBefore the fix, the assertion fails with actual `69`. I have a small fix and regression coverage prepared; the 17 handler tests pass on Java 25 with default Error Prone/NullAway enabled.\n\nAI assistance was used for investigation and test preparation.","author":{"url":"https://github.com/yangjj-iso","@type":"Person","name":"yangjj-iso"},"datePublished":"2026-11-07T14:07:05Z","url":"https://github.com/prometheus/client_java/issues/2665"}

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:a57ed116-859a-b4bf-c746-f5337d6ab0a1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDBEC:122F7E:1A4169:22ECD5:6AFBB2DB
html-safe-nonce10afafd9e3b9dcc51ccb54cce5bf6373512abd0dafb27d03b25bfa44cb8da1cf
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQkVDOjEyMkY3RToxQTQxNjk6MjJFQ0Q1OjZBRkJCMkRCIiwidmlzaXRvcl9pZCI6IjExODUxNDc4MzE0MzQ1ODg4OTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf1972cad0af9afd8bfcbeec328306add40eeb34157858ef89612021a9c101541
hovercard-subject-tagissue:6259965929
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/prometheus/client_java/2665/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f5057a5f706815e3b83962ebc09b37b76a9ea93a111e75d0a2094416fafba973/prometheus/client_java/issues/2665
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f5057a5f706815e3b83962ebc09b37b76a9ea93a111e75d0a2094416fafba973/prometheus/client_java/issues/2665
og:image:altWhat happened? A HEAD scrape with Accept-Encoding: gzip enters the compression path in PrometheusScrapeHandler and writes a gzip response body. The non-compressed path already suppresses HEAD bodie...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameyangjj-iso
hostnamegithub.com
expected-hostnamegithub.com
None2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c
turbo-cache-controlno-preview
go-importgithub.com/prometheus/client_java git https://github.com/prometheus/client_java.git
octolytics-dimension-user_id3380462
octolytics-dimension-user_loginprometheus
octolytics-dimension-repository_id7997879
octolytics-dimension-repository_nwoprometheus/client_java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7997879
octolytics-dimension-repository_network_root_nwoprometheus/client_java
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
releasee4cce0e99cf61481a318ff12c2e8580153a6c7c6
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/prometheus/client_java/issues/2665#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fprometheus%2Fclient_java%2Fissues%2F2665
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%2Fprometheus%2Fclient_java%2Fissues%2F2665
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=prometheus%2Fclient_java
Reloadhttps://github.com/prometheus/client_java/issues/2665
Reloadhttps://github.com/prometheus/client_java/issues/2665
Reloadhttps://github.com/prometheus/client_java/issues/2665
prometheushttps://github.com/prometheus
client_javahttps://github.com/prometheus/client_java
Codehttps://github.com/prometheus/client_java
Issues12 (12)https://github.com/prometheus/client_java/issues
Pull requests18 (18)https://github.com/prometheus/client_java/pulls
Actionshttps://github.com/prometheus/client_java/actions
Projectshttps://github.com/prometheus/client_java/projects
Security and qualityhttps://github.com/prometheus/client_java/security
Insightshttps://github.com/prometheus/client_java/pulse
https://github.com/prometheus/client_java
New issuehttps://github.com/login?return_to=https://github.com/prometheus/client_java/issues/2665
New issuehttps://github.com/login?return_to=https://github.com/prometheus/client_java/issues/2665
#2666https://github.com/prometheus/client_java/pull/2666
HEAD scrapes write a response body when gzip is negotiatedhttps://github.com/prometheus/client_java/issues/2665#top
#2666https://github.com/prometheus/client_java/pull/2666
https://github.com/yangjj-iso
yangjj-isohttps://github.com/yangjj-iso
on Nov 7, 2026https://github.com/prometheus/client_java/issues/2665#issue-6259965929
yangjj-isohttps://github.com/yangjj-iso
on Nov 7, 2026https://github.com/prometheus/client_java/issues/2665#event-35437326053
fix: omit response bodies for gzip HEAD requestshttps://github.com/yangjj-iso/client_java/commit/501b82e1c3bebe32f504a2bd64e88d48bd579ce7
https://docs.github.com/articles/closing-issues-via-commit-messages
501b82ehttps://github.com/yangjj-iso/client_java/commit/501b82e1c3bebe32f504a2bd64e88d48bd579ce7
Sign up for freehttps://github.com/signup?return_to=https://github.com/prometheus/client_java/issues/2665
Sign in to commenthttps://github.com/login?return_to=https://github.com/prometheus/client_java/issues/2665
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.