[PR #195] [MERGED] Core: Added all well known http status codes #224

Closed
opened 2026-05-05 03:43:19 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ultimatepp/ultimatepp/pull/195
Author: @klugier
Created: 4/7/2024
Status: Merged
Merged: 4/8/2024
Merged by: @mirek-fidler

Base: masterHead: klugier/http-status-codes


📝 Commits (5)

📊 Changes

6 files changed (+98 additions, -7 deletions)

View changed files

📝 tutorial/Network02/Network02.cpp (+8 -5)
📝 uppsrc/Core/Core.upp (+1 -0)
📝 uppsrc/Core/Http.cpp (+10 -0)
uppsrc/Core/HttpStatusCode.i (+67 -0)
📝 uppsrc/Core/Inet.h (+10 -1)
📝 uppsrc/Core/InetUtil.cpp (+2 -1)

📄 Description

I decided to add all well knowned http status code to Core. The main reason for that is to do not use magic numbers and magic strings and having everything under well defined constants.

Status codes are basing on ints, so they are a good fit for the current code base.

This change also introduces HttpStatusLine for simplifying HttpResponse calls with status codes. In the future HttpResponse function will need to be replaced. One of the reason to do it is that it will be almost impossible to implement HTTP 2.0 protocol (Break api changes required).

The implementation is similar to http implementation in GoLang (https://go.dev/src/net/http/status.go).


🔄 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/ultimatepp/ultimatepp/pull/195 **Author:** [@klugier](https://github.com/klugier) **Created:** 4/7/2024 **Status:** ✅ Merged **Merged:** 4/8/2024 **Merged by:** [@mirek-fidler](https://github.com/mirek-fidler) **Base:** `master` ← **Head:** `klugier/http-status-codes` --- ### 📝 Commits (5) - [`e65b451`](https://github.com/ultimatepp/ultimatepp/commit/e65b451e558d10a898a8cff1677100b3c57e92c8) Core: Added all available http status codes - [`d12930a`](https://github.com/ultimatepp/ultimatepp/commit/d12930a01c9152f863ec21a468d78e8c2edafab3) Merge branch 'master' of https://github.com/ultimatepp/ultimatepp into klugier/http-status-codes - [`97f5cbf`](https://github.com/ultimatepp/ultimatepp/commit/97f5cbf3b656b6855655125263a9388d3d008544) Modernized to Mirek's approch - [`3385518`](https://github.com/ultimatepp/ultimatepp/commit/3385518a76ad270c4425a03c058631252768380a) Remove HttpStatus.h - [`77d38a4`](https://github.com/ultimatepp/ultimatepp/commit/77d38a46d12ba7fbd663edc9187b93922ae9d314) .fix ### 📊 Changes **6 files changed** (+98 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `tutorial/Network02/Network02.cpp` (+8 -5) 📝 `uppsrc/Core/Core.upp` (+1 -0) 📝 `uppsrc/Core/Http.cpp` (+10 -0) ➕ `uppsrc/Core/HttpStatusCode.i` (+67 -0) 📝 `uppsrc/Core/Inet.h` (+10 -1) 📝 `uppsrc/Core/InetUtil.cpp` (+2 -1) </details> ### 📄 Description I decided to add all well knowned http status code to Core. The main reason for that is to do not use magic numbers and magic strings and having everything under well defined constants. Status codes are basing on ints, so they are a good fit for the current code base. This change also introduces HttpStatusLine for simplifying HttpResponse calls with status codes. In the future HttpResponse function will need to be replaced. One of the reason to do it is that it will be almost impossible to implement HTTP 2.0 protocol (Break api changes required). The implementation is similar to http implementation in GoLang (https://go.dev/src/net/http/status.go). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 03:43:19 -06:00
Sign in to join this conversation.
No labels
pull-request
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: github-starred/ultimatepp#224
No description provided.