Skip to content

Commit 69e4723

Browse files
committed
Merge branch '1.4.x'
2 parents 1761cb6 + bfd895a commit 69e4723

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
# Change Log
22

3+
34
## Unreleased
45

56
### Deprecated
67

78
- FilteredStream::getReadFilter The read filter is internal and should never be used by consuming code.
89
- FilteredStream::getWriteFilter We did not implement writing to the streams at all. And if we do, the filter is an internal information and should not be used by consuming code.
910

11+
12+
## 1.4.1 - 2016-12-16
13+
14+
### Fixed
15+
16+
- Cookie::matchPath Cookie with root path (`/`) will not match sub path (e.g. `/cookie`).
17+
18+
1019
## 1.4.0 - 2016-10-20
1120

1221
### Added
@@ -15,6 +24,7 @@
1524
- BufferedStream that allow you to decorate a non-seekable stream with a seekable one.
1625
- cUrlFormatter to be able to redo the request with a cURL command
1726

27+
1828
## 1.3.1 - 2016-07-15
1929

2030
### Fixed

spec/CookieSpec.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ function it_matches_a_path()
189189
$this->beConstructedWith('name', 'value', null, null, '/path/to/somewhere');
190190

191191
$this->matchPath('/path/to/somewhere')->shouldReturn(true);
192+
$this->matchPath('/path/to/somewhere/else')->shouldReturn(true);
192193
$this->matchPath('/path/to/somewhereelse')->shouldReturn(false);
193194
}
194195

@@ -197,6 +198,8 @@ function it_matches_the_root_path()
197198
$this->beConstructedWith('name', 'value', null, null, '/');
198199

199200
$this->matchPath('/')->shouldReturn(true);
201+
$this->matchPath('/cookies')->shouldReturn(true);
202+
$this->matchPath('/cookies/')->shouldReturn(true);
200203
}
201204

202205
function it_is_secure()

src/Cookie.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public function withPath($path)
313313
*/
314314
public function matchPath($path)
315315
{
316-
return $this->path === $path || (strpos($path, $this->path.'/') === 0);
316+
return $this->path === $path || (strpos($path, rtrim($this->path, '/').'/') === 0);
317317
}
318318

319319
/**

0 commit comments

Comments
 (0)