[PR #42] [MERGED] Adds 'Content-Type' header with 'application/json' value #144

Closed
opened 2026-02-25 23:40:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/HaschekSolutions/pictshare/pull/42
Author: @SpaiR
Created: 3/7/2018
Status: Merged
Merged: 3/8/2018
Merged by: @geek-at

Base: masterHead: patch-1


📝 Commits (1)

  • 3a09daa Adds 'Content-Type' header

📊 Changes

1 file changed (+2 additions, -0 deletions)

View changed files

📝 backend.php (+2 -0)

📄 Description

This PR adds Content-Type header with application/json value for all backend.php responses.

During integration of pictshare with my application I found, that all responses gotten from backend.php has text/html; charset=utf-8 value. This is not valid behavior since every return value encoded to JSON, so header is necessary. It's also necessary because some response converters looks into this value and as a result they are confused (my case).


🔄 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/HaschekSolutions/pictshare/pull/42 **Author:** [@SpaiR](https://github.com/SpaiR) **Created:** 3/7/2018 **Status:** ✅ Merged **Merged:** 3/8/2018 **Merged by:** [@geek-at](https://github.com/geek-at) **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`3a09daa`](https://github.com/HaschekSolutions/pictshare/commit/3a09daaa014af23812bd6ffa1afd200daab2a3b0) Adds 'Content-Type' header ### 📊 Changes **1 file changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend.php` (+2 -0) </details> ### 📄 Description This PR adds `Content-Type` header with `application/json` value for all `backend.php` responses. During integration of pictshare with my application I found, that all responses gotten from backend.php has `text/html; charset=utf-8` value. This is not valid behavior since every return value encoded to JSON, so header is necessary. It's also necessary because some response converters looks into this value and as a result they are confused (my case). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:40:53 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pictshare#144
No description provided.