Skip to content

Commit bd94e70

Browse files
committed
5.0.4
1 parent d077600 commit bd94e70

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [5.0.3] - 2020-02-20
9+
### Changed
10+
- Content types are now allowed to contain optional character set data
11+
(e.g. "application/json; charset=utf8")
12+
813
## [5.0.3] - 2019-09-19
914
### Changed
1015
- In the past, when the client encounters a transmission error, after receiving

src/Server.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ public function __construct($evaluator)
5151

5252
public function reply()
5353
{
54-
if (!isset($_SERVER['CONTENT_TYPE']) || ($_SERVER['CONTENT_TYPE'] !== self::$CONTENT_TYPE)) {
54+
$contentType = $_SERVER['CONTENT_TYPE'] ?? '';
55+
56+
if (strncmp($contentType, self::$CONTENT_TYPE, strlen(self::$CONTENT_TYPE)) !== 0) {
5557
self::errorInvalidContentType();
5658
}
5759

0 commit comments

Comments
 (0)