[PR #2876] [MERGED] fix(server): use HTTP status OK instead of CREATED for assets #9749

Closed
opened 2026-02-05 14:10:11 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/2876
Author: @uhthomas
Created: 6/20/2023
Status: Merged
Merged: 6/20/2023
Merged by: @alextran1502

Base: mainHead: fix-server-gzip-created


📝 Commits (1)

  • 2d167cd fix(server): use HTTP status OK instead of CREATED for assets

📊 Changes

2 files changed (+11 additions, -7 deletions)

View changed files

📝 server/immich-openapi-specs.json (+3 -3)
📝 server/src/immich/api-v1/asset/asset.controller.ts (+8 -4)

📄 Description

The NGINX gzip module does not compress responses with a status of 201, which is
a major issue specifically for the /api/asset/time-bucket endpoint where
responses can be upwards of 5Mi. The size of the response is dramatically
reduced with gzip to 500Ki in some cases.

https://trac.nginx.org/nginx/ticket/471
https://trac.nginx.org/nginx/ticket/394

The signature of these endpoints should be GET rather than POST anyway, but that
is a bigger discussion.


🔄 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/immich-app/immich/pull/2876 **Author:** [@uhthomas](https://github.com/uhthomas) **Created:** 6/20/2023 **Status:** ✅ Merged **Merged:** 6/20/2023 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `fix-server-gzip-created` --- ### 📝 Commits (1) - [`2d167cd`](https://github.com/immich-app/immich/commit/2d167cdcf1739daa059ede5736958a058c1d0e1b) fix(server): use HTTP status OK instead of CREATED for assets ### 📊 Changes **2 files changed** (+11 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `server/immich-openapi-specs.json` (+3 -3) 📝 `server/src/immich/api-v1/asset/asset.controller.ts` (+8 -4) </details> ### 📄 Description The NGINX gzip module does not compress responses with a status of 201, which is a major issue specifically for the /api/asset/time-bucket endpoint where responses can be upwards of 5Mi. The size of the response is dramatically reduced with gzip to 500Ki in some cases. https://trac.nginx.org/nginx/ticket/471 https://trac.nginx.org/nginx/ticket/394 The signature of these endpoints should be GET rather than POST anyway, but that is a bigger discussion. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:10:11 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#9749