Skip to content

Commit ea26fc5

Browse files
v0.7.4
1 parent 492a5f2 commit ea26fc5

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<img src="https://static.wikia.nocookie.net/arnelify/images/c/c8/Arnelify-logo-2024.png/revision/latest?cb=20240701012515" style="width:336px;" alt="Arnelify Logo" />
22

3-
![Arnelify Server for C++](https://img.shields.io/badge/Arnelify%20Server%20for%20C++-0.7.3-yellow) ![C++](https://img.shields.io/badge/C++-2b-red) ![G++](https://img.shields.io/badge/G++-14.2.0-blue) ![C-Lang](https://img.shields.io/badge/CLang-14.0.6-blue)
3+
![Arnelify Server for C++](https://img.shields.io/badge/Arnelify%20Server%20for%20C++-0.7.4-yellow) ![C++](https://img.shields.io/badge/C++-2b-red) ![G++](https://img.shields.io/badge/G++-14.2.0-blue) ![C-Lang](https://img.shields.io/badge/CLang-14.0.6-blue)
44

55
## 🚀 About
66
**Arnelify® Server for C++** - is a minimalistic dynamic library which is a powerful http-server written in C and C++.
@@ -72,7 +72,7 @@ Join us to help improve this software, fix bugs or implement new functionality.
7272

7373

7474
## ⭐ Release Notes
75-
Version 0.7.3 - Minimalistic dynamic library
75+
Version 0.7.4 - Minimalistic dynamic library
7676

7777
We are excited to introduce the Arnelify Server for C++ dynamic library! Please note that this version is raw and still in active development.
7878

src/cpp/io/task/receiver/index.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,13 @@ class ArnelifyReceiver final {
250250
int setHeader(const std::string& key, const std::string& value) {
251251
this->req["_state"]["headers"][key] = value;
252252

253-
const bool isAcceptEncoding = key == "Accept-Encoding";
253+
const bool isAcceptEncoding = key == "Accept-Encoding" || "accept-encoding";
254254
if (isAcceptEncoding) {
255255
this->acceptEncoding = value;
256256
return this->SIGNAL_FINISH;
257257
}
258258

259-
const bool isContentLength = key == "Content-Length";
259+
const bool isContentLength = key == "Content-Length" || "content-length";
260260
if (isContentLength) {
261261
for (char c : value) {
262262
if (!isdigit(c)) {
@@ -269,7 +269,7 @@ class ArnelifyReceiver final {
269269
return this->SIGNAL_FINISH;
270270
}
271271

272-
const bool isContentType = key == "Content-Type";
272+
const bool isContentType = key == "Content-Type" || "content-type";
273273
if (isContentType) {
274274
if (this->hasBody) {
275275
this->contentType = value;
@@ -288,7 +288,7 @@ class ArnelifyReceiver final {
288288
if (SIGNAL_BOUNDARY != this->SIGNAL_FINISH) return SIGNAL_BOUNDARY;
289289
}
290290

291-
const bool isCookie = key == "Cookie";
291+
const bool isCookie = key == "Cookie" || "cookie";
292292
if (isCookie) {
293293
const int SIGNAL_COOKIE = this->setCookie(value);
294294
if (SIGNAL_COOKIE != this->SIGNAL_FINISH) return SIGNAL_COOKIE;
@@ -478,7 +478,8 @@ class ArnelifyReceiver final {
478478
while (metaEnd != std::string::npos) {
479479
const std::string header = meta.substr(0, metaEnd);
480480
const bool hasContentDisposition =
481-
header.starts_with("Content-Disposition");
481+
header.starts_with("Content-Disposition") ||
482+
header.starts_with("content-disposition");
482483
if (hasContentDisposition) {
483484
const std::size_t nameStart = header.find("name=\"");
484485
const bool hasNameStart = nameStart != std::string::npos;
@@ -551,7 +552,8 @@ class ArnelifyReceiver final {
551552
}
552553
}
553554

554-
const bool hasContentType = header.starts_with("Content-Type");
555+
const bool hasContentType = header.starts_with("Content-Type") ||
556+
header.starts_with("content-type");
555557
if (hasContentType) {
556558
const std::size_t mimeStart = header.find(": ");
557559
const bool hasMime = mimeStart != std::string::npos;

0 commit comments

Comments
 (0)