Skip to content

Commit ac7e28c

Browse files
committed
Merge branch '2.4' into 2.5
* 2.4: Minor doc fix. Simplified the way to update PHPUnit to the latest version [Process] Minor README update [HttpFoundation] Basic auth in url is broken when using PHP CGI/FPM Fixed a html error "Element ul is not closed" in logger.html.twig [HttpFoundation] Officialize the 308 redirect RFC Officialize the 308 redirect RFC issue #10808 crawler test Empty select with attribute name="foo[]" bug fix Fixed contextually wrong translation
2 parents efa2b93 + ac0a755 commit ac7e28c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Request.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ public function getPort()
972972
*/
973973
public function getUser()
974974
{
975-
return $this->server->get('PHP_AUTH_USER');
975+
return $this->headers->get('PHP_AUTH_USER');
976976
}
977977

978978
/**
@@ -982,7 +982,7 @@ public function getUser()
982982
*/
983983
public function getPassword()
984984
{
985-
return $this->server->get('PHP_AUTH_PW');
985+
return $this->headers->get('PHP_AUTH_PW');
986986
}
987987

988988
/**

Response.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Response
4141
const HTTP_USE_PROXY = 305;
4242
const HTTP_RESERVED = 306;
4343
const HTTP_TEMPORARY_REDIRECT = 307;
44-
const HTTP_PERMANENTLY_REDIRECT = 308; // RFC-reschke-http-status-308-07
44+
const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238
4545
const HTTP_BAD_REQUEST = 400;
4646
const HTTP_UNAUTHORIZED = 401;
4747
const HTTP_PAYMENT_REQUIRED = 402;
@@ -144,7 +144,7 @@ class Response
144144
305 => 'Use Proxy',
145145
306 => 'Reserved',
146146
307 => 'Temporary Redirect',
147-
308 => 'Permanent Redirect', // RFC-reschke-http-status-308-07
147+
308 => 'Permanent Redirect', // RFC7238
148148
400 => 'Bad Request',
149149
401 => 'Unauthorized',
150150
402 => 'Payment Required',

Tests/RequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public function testCreate()
209209
$this->assertEquals(80, $request->getPort());
210210
$this->assertEquals('test.com', $request->getHttpHost());
211211
$this->assertEquals('testnopass', $request->getUser());
212-
$this->assertNull($request->getPassword());
212+
$this->assertSame('',$request->getPassword());
213213
$this->assertFalse($request->isSecure());
214214

215215
$request = Request::create('http://test.com/?foo');

0 commit comments

Comments
 (0)