[PR #216] [CLOSED] Use temporary file to avoid out-of-memory when receiving big chunks. #15230

Closed
opened 2025-11-02 11:41:52 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/216
Author: @typeless
Created: 11/22/2016
Status: Closed

Base: masterHead: develop


📝 Commits (2)

  • 4cb89bc Use temporary file to avoid out-of-memory when receiving big chunk.
  • a0ca633 Must close the open file to avoid fd leaks

📊 Changes

1 file changed (+12 additions, -3 deletions)

View changed files

📝 routers/repo/http.go (+12 -3)

📄 Description

Not perfect but I think it's a reasonable solution.
For small request bodies, I suppose performance wouldn't be an issue.
For large ones, this seems to be a necessary evil.

Fixes #218


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/216 **Author:** [@typeless](https://github.com/typeless) **Created:** 11/22/2016 **Status:** ❌ Closed **Base:** `master` ← **Head:** `develop` --- ### 📝 Commits (2) - [`4cb89bc`](https://github.com/go-gitea/gitea/commit/4cb89bc400ce2a2dedb9aabb89dd4c09b40d6243) Use temporary file to avoid out-of-memory when receiving big chunk. - [`a0ca633`](https://github.com/go-gitea/gitea/commit/a0ca633c1ad39eef3445a0601723518e0506be99) Must close the open file to avoid fd leaks ### 📊 Changes **1 file changed** (+12 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `routers/repo/http.go` (+12 -3) </details> ### 📄 Description Not perfect but I think it's a reasonable solution. For small request bodies, I suppose performance wouldn't be an issue. For large ones, this seems to be a necessary evil. Fixes #218 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:41:52 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15230