Skip to content

Commit

Permalink
Fix server checking the URL prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
sagikazarmark committed Jun 29, 2018
1 parent 927e8a6 commit 9c86696
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed

- Server checking the URL prefix


## [0.4.0] - 2018-06-28

Expand Down
2 changes: 1 addition & 1 deletion php/src/Server.php
Expand Up @@ -66,7 +66,7 @@ public function registerServer($prefix, RequestHandler $server)
public function handle(ServerRequestInterface $req)
{
foreach ($this->handlers as $prefix => $handler) {
if (strpos($req->getUri()->getPath(), $prefix) == 0) {
if (strpos($req->getUri()->getPath(), $prefix) === 0) {
return $handler->handle($req);
}
}
Expand Down

0 comments on commit 9c86696

Please sign in to comment.