Title: Hard-coded 10MB bodyLimit blocks large git pushes · Issue #474 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Hard-coded 10MB bodyLimit blocks large git pushes · Issue #474 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Hard-coded 10MB bodyLimit blocks large git pushes · Issue #474 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Symptom ``` git -c http.extraHeader="Authorization: Bearer $TOKEN" push http://localhost:5444/public/apps/chat HEAD:gh-pages → error: RPC failed; HTTP 413 → send-pack: unexpected disconnect while reading sideband packet → fatal: the remo...
Open Graph Description: Symptom ``` git -c http.extraHeader="Authorization: Bearer $TOKEN" push http://localhost:5444/public/apps/chat HEAD:gh-pages → error: RPC failed; HTTP 413 → send-pack: unexpected disconnect while r...
X Description: Symptom ``` git -c http.extraHeader="Authorization: Bearer $TOKEN" push http://localhost:5444/public/apps/chat HEAD:gh-pages → error: RPC failed; HTTP 413 → send-pack: unexpected disconne...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/474
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Hard-coded 10MB bodyLimit blocks large git pushes","articleBody":"## Symptom\n\n\\`\\`\\`\ngit -c http.extraHeader=\"Authorization: Bearer \\$TOKEN\" \\\n push http://localhost:5444/public/apps/chat HEAD:gh-pages\n# → error: RPC failed; HTTP 413\n# → send-pack: unexpected disconnect while reading sideband packet\n# → fatal: the remote end hung up unexpectedly\n\\`\\`\\`\n\nHit this trying to install [solid-chat/app](https://github.com/solid-chat/app) on a jspod — the pack is ~30 MiB (3 years of history; tracked working tree is only ~444 KB), and JSS rejects it.\n\n## Cause\n\n\\`src/server.js:187\\` hard-codes Fastify's \\`bodyLimit\\` to 10 MB:\n\n\\`\\`\\`js\nconst fastifyOptions = {\n …\n bodyLimit: 10 * 1024 * 1024, // 10MB\n …\n};\n\\`\\`\\`\n\nThis caps every request body across the server. Reasonable for normal PUT/POST, but git pushes can be much larger — especially first-push of an established repo, or merges with binary assets.\n\nThe git handler runs as a \\`preHandler\\` hook on wildcard routes (\\`fastify.addHook('preHandler', …)\\` at server.js:500), so Fastify's body-size check has already fired before any git-specific code runs. A route-level \\`bodyLimit\\` override isn't reachable here.\n\n## Proposed fix\n\nMake \\`bodyLimit\\` configurable:\n\n1. \\`createServer({ bodyLimit })\\` option, default \\`10 * 1024 * 1024\\` (no behavior change).\n2. CLI flag: \\`--body-limit \u003cbytes|kb|mb|gb>\\` (or \\`--max-upload-size\\`), parsed to bytes.\n3. Document the trade-off in \\`--help\\`: higher = bigger pushes accepted, lower = more memory-DoS resistant.\n\n\\`\\`\\`js\nbodyLimit: options.bodyLimit ?? (10 * 1024 * 1024),\n\\`\\`\\`\n\nWrappers like jspod can then default to a more generous limit (e.g. 100 MB) for the personal-pod use case where the operator is the user.\n\n## Scope\n\n~5 LoC in \\`src/server.js\\` + CLI arg parsing in \\`bin/jss.js\\` + a help-line update. No new dependencies. Test: existing tests pass with default; one new test pushing a >10 MB pack with raised limit.\n\n## Optional follow-up\n\nIf we want git pushes to be the *only* thing that can exceed the global cap, we could pre-parse the URL in a custom \\`contentTypeParser\\` and apply a different limit for \\`application/x-git-receive-pack-request\\`. More surgical, but more code. Open to either path.","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-17T01:29:04Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/474"}
| 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:ea2b59a3-c049-3cc3-1a85-d5215a24ae29 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA20:50BE3:2AA0238:3848787:6B039155 |
| html-safe-nonce | 73fcd74f9c0038632391f8119b7b601485600a31359c63b120d7307c3d4116f7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTIwOjUwQkUzOjJBQTAyMzg6Mzg0ODc4Nzo2QjAzOTE1NSIsInZpc2l0b3JfaWQiOiI1MTg0OTAxNTc2ODQxNzI4MzQxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0993850cffb288bdf327786b48b21b15bf06f087ad3e27f0219ef7a48827b700 |
| hovercard-subject-tag | issue:4461898871 |
| 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/JavaScriptSolidServer/JavaScriptSolidServer/474/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0b5c8cbd3e53a5a9edc17727f923c54c9b2eba0a4e2d5ebb647168525825db54/JavaScriptSolidServer/JavaScriptSolidServer/issues/474 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0b5c8cbd3e53a5a9edc17727f923c54c9b2eba0a4e2d5ebb647168525825db54/JavaScriptSolidServer/JavaScriptSolidServer/issues/474 |
| og:image:alt | Symptom ``` git -c http.extraHeader="Authorization: Bearer $TOKEN" push http://localhost:5444/public/apps/chat HEAD:gh-pages → error: RPC failed; HTTP 413 → send-pack: unexpected disconnect while r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width