Title: HttpTransferCache collapses distinct binary POST bodies into the same cache key · Issue #70226 · angular/angular · GitHub
Open Graph Title: HttpTransferCache collapses distinct binary POST bodies into the same cache key · Issue #70226 · angular/angular
X Title: HttpTransferCache collapses distinct binary POST bodies into the same cache key · Issue #70226 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? common / http Is this a regression? No Description With POST requests enabled in HttpTransferCache, two requests with different binary bodies can end up sharing one cache entry. This...
Open Graph Description: Which @angular/* package(s) are the source of the bug? common / http Is this a regression? No Description With POST requests enabled in HttpTransferCache, two requests with different binary bodies ...
X Description: Which @angular/* package(s) are the source of the bug? common / http Is this a regression? No Description With POST requests enabled in HttpTransferCache, two requests with different binary bodies ...
Opengraph URL: https://github.com/angular/angular/issues/70226
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"HttpTransferCache collapses distinct binary POST bodies into the same cache key","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\ncommon / http\n\n### Is this a regression?\n\nNo\n\n### Description\n\nWith POST requests enabled in `HttpTransferCache`, two requests with different binary bodies can end up sharing one cache entry. This matters for valid POST-based APIs such as Protobuf and gRPC, where the request body carries the input. The same cache-key rule also applies to other POST APIs, including GraphQL requests.\n\nI reproduced this with two read-only Protobuf requests to the same URL. The bodies are valid, but different:\n\n```text\ndocument 100: 0864 document 200: 08c801\n```\n\nAngular should treat these as separate requests and cache their responses separately. Instead, the request for document `200` gets the cached response for document `100`; it never reaches the origin.\n\n```ts\nelse if (typeof serializedBody !== 'string') {\n serializedBody = '';\n}\n```\n\n`HttpRequest.serializeBody()` returns a `Blob` as-is. Because a `Blob` is not a string, `makeCacheKey()` turns it into `''`. That means both Protobuf payloads have the same cache-key input before hashing. \n\n ### Please provide a link to a minimal reproduction of the bug\n See Repository: https://github.com/SkyZeroZx/angular-protobuf-transfercache-poc","author":{"url":"https://github.com/SkyZeroZx","@type":"Person","name":"SkyZeroZx"},"datePublished":"2026-08-16T21:05:47Z","url":"https://github.com/angular/angular/issues/70226"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a21e46d7-c31a-7976-8015-24c53a585ee5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8928:313081:FF7618:1518F63:6B01D8F4 |
| html-safe-nonce | 301e178ba8af86d4bc4dd4c5488181c56be970ae06701d34b52cf37e8100e69b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTI4OjMxMzA4MTpGRjc2MTg6MTUxOEY2Mzo2QjAxRDhGNCIsInZpc2l0b3JfaWQiOiI2MTc1MTQ5MDMwNDQ4OTQ1Mzk2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6b14c0509d3eb232ad6abe087da8b5d4d174d2a07b2f86d21d20fd816e04e71a |
| hovercard-subject-tag | issue:5166374326 |
| 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/angular/angular/70226/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e37c421127becafcd73702eb737d40784631a1a5c290871da1ff914fd92ff558/angular/angular/issues/70226 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e37c421127becafcd73702eb737d40784631a1a5c290871da1ff914fd92ff558/angular/angular/issues/70226 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? common / http Is this a regression? No Description With POST requests enabled in HttpTransferCache, two requests with different binary bodies ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SkyZeroZx |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width