forgejo/services/context
Julian Schlarb a8e375eb28 fix: omit Content-Length on 307 redirects when serving direct manifest for containers (#8037)
Containers have been refactored to use the same serve method as other packages, ensuring consistent response handling.

fixes #7888

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/8037): <!--number 8037 --><!--line 0 --><!--description b21pdCBDb250ZW50LUxlbmd0aCBvbiAzMDcgcmVkaXJlY3RzIHdoZW4gc2VydmluZyBkaXJlY3QgbWFuaWZlc3QgZm9yIGNvbnRhaW5lcnM=-->omit Content-Length on 307 redirects when serving direct manifest for containers<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8037
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Julian Schlarb <julian.schlarb@denktmit.de>
Co-committed-by: Julian Schlarb <julian.schlarb@denktmit.de>
2025-06-09 08:43:41 +02:00
..
upload Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
access_log.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
api.go chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
api_org.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
api_test.go chore: QoL improvements to tests (#7917) 2025-05-21 15:45:56 +02:00
base.go fix: omit Content-Length on 307 redirects when serving direct manifest for containers (#8037) 2025-06-09 08:43:41 +02:00
base_test.go fix: omit Content-Length on 307 redirects when serving direct manifest for containers (#8037) 2025-06-09 08:43:41 +02:00
captcha.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
context.go Replace the 'relative-time' element scripting with custom, translatable rewrite (#6154) 2025-05-03 14:11:01 +00:00
context_cookie.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
context_model.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
context_request.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
context_response.go ui: improve error pages (#7274) 2025-03-28 19:50:43 +00:00
context_template.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
context_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
csrf.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
org.go feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
package.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
pagination.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
permission.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
private.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
quota.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
repo.go feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
repository.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
response.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
user.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
utils.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
xsrf.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
xsrf_test.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00