mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-30 04:20:53 +00:00
b8373b0afc
The gin context (c) may be recycled after the HTTP handler returns 202 for async tasks. Accessing c.Params.ByName() inside the task closure returns an empty string, causing 'mirror with name not found' errors. Capture the URL :name parameter into a local variable before the closure so it is safely captured by value. Affected endpoints: - PUT /api/mirrors/:name (apiMirrorsUpdate) - POST/DELETE /api/repos/:name/packages (apiReposPackagesAddDelete)