Title: Add test coverage for git handler URL normalization · Issue #375 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Add test coverage for git handler URL normalization · Issue #375 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Add test coverage for git handler URL normalization · Issue #375 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Follow-up from #374 (Copilot review). The git handler at `src/handlers/git.js` has no automated test coverage — the recent #371 (CORS) and #373 (multi-slash) fixes were verified by hand with curl + a local boot. Suggested coverage `OPTIO...
Open Graph Description: Follow-up from #374 (Copilot review). The git handler at `src/handlers/git.js` has no automated test coverage — the recent #371 (CORS) and #373 (multi-slash) fixes were verified by hand with curl +...
X Description: Follow-up from #374 (Copilot review). The git handler at `src/handlers/git.js` has no automated test coverage — the recent #371 (CORS) and #373 (multi-slash) fixes were verified by hand with curl +...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/375
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add test coverage for git handler URL normalization","articleBody":"Follow-up from #374 (Copilot review). The git handler at \\`src/handlers/git.js\\` has no automated test coverage — the recent #371 (CORS) and #373 (multi-slash) fixes were verified by hand with curl + a local boot.\n\n## Suggested coverage\n\n- \\`OPTIONS\\` preflight returns the canonical CORS headers (\\`Content-Type, Authorization, Git-Protocol\\`)\n- Single-slash \\`info/refs?service=git-upload-pack\\` → 200 with \\`application/x-git-upload-pack-advertisement\\`\n- Double-slash \\`//info/refs\\` → 200 (regression for #373)\n- Triple-slash \\`///info/refs\\` → 200\n- Missing repo → 404 with CORS headers (regression for the #374 follow-up)\n- Path traversal attempt → 403 with CORS headers\n- Push (POST \\`git-receive-pack\\`) without auth → 401 with CORS headers\n- Push with auth → 200 (or 200 + receive-pack output)\n\n## Shape\n\nProbably an integration test along the lines of \\`test/idp.test.js\\` — boot a temp \\`createServer({ git: true, public: true, root: tmpDir })\\`, init a bare repo at \\`tmpDir/repo.git\\`, hit it with \\`fetch\\`. Already a working pattern in this repo for HTTP-level tests.\n\n## Refs\n\n- #371 — Git-Protocol CORS header\n- #373 — multi-slash 500\n- #374 — the PR that closed #373","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-08T01:36:34Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/375"}
| 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:4758aaf1-8906-30cb-1c3e-b9b01b26ea66 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A054:39B4E5:37F85B:46EB47:6B03964C |
| html-safe-nonce | bb32a7f5252bff594827508fc5266a3715614b70a80a282804ac2cc6548c1fb6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDU0OjM5QjRFNTozN0Y4NUI6NDZFQjQ3OjZCMDM5NjRDIiwidmlzaXRvcl9pZCI6IjI1MTk2NTI4MTM3ODU3NjU0NTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 23a09cb7fb6f7c460335c816e46cf800c45e2848f313ced9653883461ece4a14 |
| hovercard-subject-tag | issue:4403099606 |
| 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/375/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a9b59f093fb1472550160f0e7a93c0b7c09bb362dd62d53392efcd75a786fbe1/JavaScriptSolidServer/JavaScriptSolidServer/issues/375 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a9b59f093fb1472550160f0e7a93c0b7c09bb362dd62d53392efcd75a786fbe1/JavaScriptSolidServer/JavaScriptSolidServer/issues/375 |
| og:image:alt | Follow-up from #374 (Copilot review). The git handler at `src/handlers/git.js` has no automated test coverage — the recent #371 (CORS) and #373 (multi-slash) fixes were verified by hand with curl +... |
| 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