resolveURL: HEAD method not universally supported on .git URLs #33
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
heiko/gogogo#33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
resolveURLuseshttp.MethodHeadto probe the clone URL for redirects. Some git forges return 404 or 405 for HEAD on.gitURLs even when GET would redirect correctly. If that happens,resolveURLreturns the original URL and git then encounters the redirect itself — and fails because it strips embedded credentials on cross-host redirects.Suggested fix
Use
http.MethodGetwith an immediate body close instead of HEAD. Less efficient but more broadly compatible.Identified by AI code review (Claude Sonnet 4.6)