HttpResponseTest.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. <?php
  2. /**
  3. * HttpResponseTest file
  4. *
  5. * PHP 5
  6. *
  7. * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
  8. * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  9. *
  10. * Licensed under The MIT License
  11. * Redistributions of files must retain the above copyright notice
  12. *
  13. * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  14. * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
  15. * @package Cake.Test.Case.Network.Http
  16. * @since CakePHP(tm) v 1.2.0.4206
  17. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  18. */
  19. App::uses('HttpResponse', 'Network/Http');
  20. /**
  21. * TestHttpResponse class
  22. *
  23. * @package Cake.Test.Case.Network.Http
  24. */
  25. class TestHttpResponse extends HttpResponse {
  26. /**
  27. * Convenience method for testing protected method
  28. *
  29. * @param array $header Header as an indexed array (field => value)
  30. * @return array Parsed header
  31. */
  32. public function parseHeader($header) {
  33. return parent::_parseHeader($header);
  34. }
  35. /**
  36. * Convenience method for testing protected method
  37. *
  38. * @param string $body A string containing the body to decode
  39. * @param boolean|string $encoding Can be false in case no encoding is being used, or a string representing the encoding
  40. * @return mixed Array or false
  41. */
  42. public function decodeBody($body, $encoding = 'chunked') {
  43. return parent::_decodeBody($body, $encoding);
  44. }
  45. /**
  46. * Convenience method for testing protected method
  47. *
  48. * @param string $body A string containing the chunked body to decode
  49. * @return mixed Array or false
  50. */
  51. public function decodeChunkedBody($body) {
  52. return parent::_decodeChunkedBody($body);
  53. }
  54. /**
  55. * Convenience method for testing protected method
  56. *
  57. * @param string $token Token to unescape
  58. * @return string Unescaped token
  59. */
  60. public function unescapeToken($token, $chars = null) {
  61. return parent::_unescapeToken($token, $chars);
  62. }
  63. /**
  64. * Convenience method for testing protected method
  65. *
  66. * @param boolean $hex true to get them as HEX values, false otherwise
  67. * @return array Escape chars
  68. */
  69. public function tokenEscapeChars($hex = true, $chars = null) {
  70. return parent::_tokenEscapeChars($hex, $chars);
  71. }
  72. }
  73. /**
  74. * HttpResponseTest class
  75. *
  76. * @package Cake.Test.Case.Network.Http
  77. */
  78. class HttpResponseTest extends CakeTestCase {
  79. /**
  80. * This function sets up a HttpResponse
  81. *
  82. * @return void
  83. */
  84. public function setUp() {
  85. $this->HttpResponse = new TestHttpResponse();
  86. }
  87. /**
  88. * testBody
  89. *
  90. * @return void
  91. */
  92. public function testBody() {
  93. $this->HttpResponse->body = 'testing';
  94. $this->assertEquals('testing', $this->HttpResponse->body());
  95. $this->HttpResponse->body = null;
  96. $this->assertSame($this->HttpResponse->body(), '');
  97. }
  98. /**
  99. * testToString
  100. *
  101. * @return void
  102. */
  103. public function testToString() {
  104. $this->HttpResponse->body = 'other test';
  105. $this->assertEquals('other test', $this->HttpResponse->body());
  106. $this->assertEquals('other test', (string)$this->HttpResponse);
  107. $this->assertTrue(strpos($this->HttpResponse, 'test') > 0);
  108. $this->HttpResponse->body = null;
  109. $this->assertEquals('', (string)$this->HttpResponse);
  110. }
  111. /**
  112. * testGetHeader
  113. *
  114. * @return void
  115. */
  116. public function testGetHeader() {
  117. $this->HttpResponse->headers = array(
  118. 'foo' => 'Bar',
  119. 'Some' => 'ok',
  120. 'HeAdEr' => 'value',
  121. 'content-Type' => 'text/plain'
  122. );
  123. $this->assertEquals('Bar', $this->HttpResponse->getHeader('foo'));
  124. $this->assertEquals('Bar', $this->HttpResponse->getHeader('Foo'));
  125. $this->assertEquals('Bar', $this->HttpResponse->getHeader('FOO'));
  126. $this->assertEquals('value', $this->HttpResponse->getHeader('header'));
  127. $this->assertEquals('text/plain', $this->HttpResponse->getHeader('Content-Type'));
  128. $this->assertSame($this->HttpResponse->getHeader(0), null);
  129. $this->assertEquals('Bar', $this->HttpResponse->getHeader('foo', false));
  130. $this->assertEquals('not from class', $this->HttpResponse->getHeader('foo', array('foo' => 'not from class')));
  131. }
  132. /**
  133. * testIsOk
  134. *
  135. * @return void
  136. */
  137. public function testIsOk() {
  138. $this->HttpResponse->code = 0;
  139. $this->assertFalse($this->HttpResponse->isOk());
  140. $this->HttpResponse->code = -1;
  141. $this->assertFalse($this->HttpResponse->isOk());
  142. $this->HttpResponse->code = 'what?';
  143. $this->assertFalse($this->HttpResponse->isOk());
  144. $this->HttpResponse->code = 200;
  145. $this->assertTrue($this->HttpResponse->isOk());
  146. $this->HttpResponse->code = 201;
  147. $this->assertTrue($this->HttpResponse->isOk());
  148. $this->HttpResponse->code = 202;
  149. $this->assertTrue($this->HttpResponse->isOk());
  150. $this->HttpResponse->code = 203;
  151. $this->assertTrue($this->HttpResponse->isOk());
  152. $this->HttpResponse->code = 204;
  153. $this->assertTrue($this->HttpResponse->isOk());
  154. $this->HttpResponse->code = 205;
  155. $this->assertTrue($this->HttpResponse->isOk());
  156. $this->HttpResponse->code = 206;
  157. $this->assertTrue($this->HttpResponse->isOk());
  158. $this->HttpResponse->code = 207;
  159. $this->assertFalse($this->HttpResponse->isOk());
  160. $this->HttpResponse->code = 208;
  161. $this->assertFalse($this->HttpResponse->isOk());
  162. $this->HttpResponse->code = 209;
  163. $this->assertFalse($this->HttpResponse->isOk());
  164. $this->HttpResponse->code = 210;
  165. $this->assertFalse($this->HttpResponse->isOk());
  166. $this->HttpResponse->code = 226;
  167. $this->assertFalse($this->HttpResponse->isOk());
  168. $this->HttpResponse->code = 288;
  169. $this->assertFalse($this->HttpResponse->isOk());
  170. $this->HttpResponse->code = 301;
  171. $this->assertFalse($this->HttpResponse->isOk());
  172. }
  173. /**
  174. * testIsRedirect
  175. *
  176. * @return void
  177. */
  178. public function testIsRedirect() {
  179. $this->HttpResponse->code = 0;
  180. $this->assertFalse($this->HttpResponse->isRedirect());
  181. $this->HttpResponse->code = -1;
  182. $this->assertFalse($this->HttpResponse->isRedirect());
  183. $this->HttpResponse->code = 201;
  184. $this->assertFalse($this->HttpResponse->isRedirect());
  185. $this->HttpResponse->code = 'what?';
  186. $this->assertFalse($this->HttpResponse->isRedirect());
  187. $this->HttpResponse->code = 301;
  188. $this->assertFalse($this->HttpResponse->isRedirect());
  189. $this->HttpResponse->code = 302;
  190. $this->assertFalse($this->HttpResponse->isRedirect());
  191. $this->HttpResponse->code = 303;
  192. $this->assertFalse($this->HttpResponse->isRedirect());
  193. $this->HttpResponse->code = 307;
  194. $this->assertFalse($this->HttpResponse->isRedirect());
  195. $this->HttpResponse->code = 301;
  196. $this->HttpResponse->headers['Location'] = 'http://somewhere/';
  197. $this->assertTrue($this->HttpResponse->isRedirect());
  198. $this->HttpResponse->code = 302;
  199. $this->HttpResponse->headers['Location'] = 'http://somewhere/';
  200. $this->assertTrue($this->HttpResponse->isRedirect());
  201. $this->HttpResponse->code = 303;
  202. $this->HttpResponse->headers['Location'] = 'http://somewhere/';
  203. $this->assertTrue($this->HttpResponse->isRedirect());
  204. $this->HttpResponse->code = 307;
  205. $this->HttpResponse->headers['Location'] = 'http://somewhere/';
  206. $this->assertTrue($this->HttpResponse->isRedirect());
  207. }
  208. /**
  209. * Test that HttpSocket::parseHeader can take apart a given (and valid) $header string and turn it into an array.
  210. *
  211. * @return void
  212. */
  213. public function testParseHeader() {
  214. $r = $this->HttpResponse->parseHeader(array('foo' => 'Bar', 'fOO-bAr' => 'quux'));
  215. $this->assertEquals(array('foo' => 'Bar', 'fOO-bAr' => 'quux'), $r);
  216. $r = $this->HttpResponse->parseHeader(true);
  217. $this->assertEquals(false, $r);
  218. $header = "Host: cakephp.org\t\r\n";
  219. $r = $this->HttpResponse->parseHeader($header);
  220. $expected = array(
  221. 'Host' => 'cakephp.org'
  222. );
  223. $this->assertEquals($expected, $r);
  224. $header = "Date:Sat, 07 Apr 2007 10:10:25 GMT\r\nX-Powered-By: PHP/5.1.2\r\n";
  225. $r = $this->HttpResponse->parseHeader($header);
  226. $expected = array(
  227. 'Date' => 'Sat, 07 Apr 2007 10:10:25 GMT',
  228. 'X-Powered-By' => 'PHP/5.1.2'
  229. );
  230. $this->assertEquals($expected, $r);
  231. $header = "people: Jim,John\r\nfoo-LAND: Bar\r\ncAKe-PHP: rocks\r\n";
  232. $r = $this->HttpResponse->parseHeader($header);
  233. $expected = array(
  234. 'people' => 'Jim,John',
  235. 'foo-LAND' => 'Bar',
  236. 'cAKe-PHP' => 'rocks'
  237. );
  238. $this->assertEquals($expected, $r);
  239. $header = "People: Jim,John,Tim\r\nPeople: Lisa,Tina,Chelsea\r\n";
  240. $r = $this->HttpResponse->parseHeader($header);
  241. $expected = array(
  242. 'People' => array('Jim,John,Tim', 'Lisa,Tina,Chelsea')
  243. );
  244. $this->assertEquals($expected, $r);
  245. $header = "Multi-Line: I am a \r\nmulti line\t\r\nfield value.\r\nSingle-Line: I am not\r\n";
  246. $r = $this->HttpResponse->parseHeader($header);
  247. $expected = array(
  248. 'Multi-Line' => "I am a\r\nmulti line\r\nfield value.",
  249. 'Single-Line' => 'I am not'
  250. );
  251. $this->assertEquals($expected, $r);
  252. $header = "Esc\"@\"ped: value\r\n";
  253. $r = $this->HttpResponse->parseHeader($header);
  254. $expected = array(
  255. 'Esc@ped' => 'value'
  256. );
  257. $this->assertEquals($expected, $r);
  258. }
  259. /**
  260. * testParseResponse method
  261. *
  262. * @return void
  263. */
  264. public function testParseResponse() {
  265. $tests = array(
  266. 'simple-request' => array(
  267. 'response' => array(
  268. 'status-line' => "HTTP/1.x 200 OK\r\n",
  269. 'header' => "Date: Mon, 16 Apr 2007 04:14:16 GMT\r\nServer: CakeHttp Server\r\n",
  270. 'body' => "<h1>Hello World</h1>\r\n<p>It's good to be html</p>"
  271. ),
  272. 'expectations' => array(
  273. 'httpVersion' => 'HTTP/1.x',
  274. 'code' => 200,
  275. 'reasonPhrase' => 'OK',
  276. 'headers' => array('Date' => 'Mon, 16 Apr 2007 04:14:16 GMT', 'Server' => 'CakeHttp Server'),
  277. 'body' => "<h1>Hello World</h1>\r\n<p>It's good to be html</p>"
  278. )
  279. ),
  280. 'no-header' => array(
  281. 'response' => array(
  282. 'status-line' => "HTTP/1.x 404 OK\r\n",
  283. 'header' => null
  284. ),
  285. 'expectations' => array(
  286. 'code' => 404,
  287. 'headers' => array()
  288. )
  289. )
  290. );
  291. $testResponse = array();
  292. $expectations = array();
  293. foreach ($tests as $name => $test) {
  294. $testResponse = array_merge($testResponse, $test['response']);
  295. $testResponse['response'] = $testResponse['status-line'] . $testResponse['header'] . "\r\n" . $testResponse['body'];
  296. $this->HttpResponse->parseResponse($testResponse['response']);
  297. $expectations = array_merge($expectations, $test['expectations']);
  298. foreach ($expectations as $property => $expectedVal) {
  299. $this->assertEquals($expectedVal, $this->HttpResponse->{$property}, 'Test "' . $name . '": response.' . $property . ' - %s');
  300. }
  301. foreach (array('status-line', 'header', 'body', 'response') as $field) {
  302. $this->assertEquals($this->HttpResponse['raw'][$field], $testResponse[$field], 'Test response.raw.' . $field . ': %s');
  303. }
  304. }
  305. }
  306. /**
  307. * data provider function for testInvalidParseResponseData
  308. *
  309. * @return array
  310. */
  311. public static function invalidParseResponseDataProvider() {
  312. return array(
  313. array(array('foo' => 'bar')),
  314. array(true),
  315. array("HTTP Foo\r\nBar: La"),
  316. array('HTTP/1.1 TEST ERROR')
  317. );
  318. }
  319. /**
  320. * testInvalidParseResponseData
  321. *
  322. * @dataProvider invalidParseResponseDataProvider
  323. * @expectedException SocketException
  324. * return void
  325. */
  326. public function testInvalidParseResponseData($value) {
  327. $this->HttpResponse->parseResponse($value);
  328. }
  329. /**
  330. * testDecodeBody method
  331. *
  332. * @return void
  333. */
  334. public function testDecodeBody() {
  335. $r = $this->HttpResponse->decodeBody(true);
  336. $this->assertEquals(false, $r);
  337. $r = $this->HttpResponse->decodeBody('Foobar', false);
  338. $this->assertEquals(array('body' => 'Foobar', 'header' => false), $r);
  339. $encoding = 'chunked';
  340. $sample = array(
  341. 'encoded' => "19\r\nThis is a chunked message\r\n0\r\n",
  342. 'decoded' => array('body' => "This is a chunked message", 'header' => false)
  343. );
  344. $r = $this->HttpResponse->decodeBody($sample['encoded'], $encoding);
  345. $this->assertEquals($r, $sample['decoded']);
  346. $encoding = 'chunked';
  347. $sample = array(
  348. 'encoded' => "19\nThis is a chunked message\r\n0\n",
  349. 'decoded' => array('body' => "This is a chunked message", 'header' => false)
  350. );
  351. $r = $this->HttpResponse->decodeBody($sample['encoded'], $encoding);
  352. $this->assertEquals($r, $sample['decoded'], 'Inconsistent line terminators should be tolerated.');
  353. }
  354. /**
  355. * testDecodeFooCoded
  356. *
  357. * @return void
  358. */
  359. public function testDecodeFooCoded() {
  360. $r = $this->HttpResponse->decodeBody(true);
  361. $this->assertEquals(false, $r);
  362. $r = $this->HttpResponse->decodeBody('Foobar', false);
  363. $this->assertEquals(array('body' => 'Foobar', 'header' => false), $r);
  364. $encoding = 'foo-bar';
  365. $sample = array(
  366. 'encoded' => '!Foobar!',
  367. 'decoded' => array('body' => '!Foobar!', 'header' => false),
  368. );
  369. $r = $this->HttpResponse->decodeBody($sample['encoded'], $encoding);
  370. $this->assertEquals($r, $sample['decoded']);
  371. }
  372. /**
  373. * testDecodeChunkedBody method
  374. *
  375. * @return void
  376. */
  377. public function testDecodeChunkedBody() {
  378. $r = $this->HttpResponse->decodeChunkedBody(true);
  379. $this->assertEquals(false, $r);
  380. $encoded = "19\r\nThis is a chunked message\r\n0\r\n";
  381. $decoded = "This is a chunked message";
  382. $r = $this->HttpResponse->decodeChunkedBody($encoded);
  383. $this->assertEquals($r['body'], $decoded);
  384. $this->assertEquals(false, $r['header']);
  385. $encoded = "19 \r\nThis is a chunked message\r\n0\r\n";
  386. $r = $this->HttpResponse->decodeChunkedBody($encoded);
  387. $this->assertEquals($r['body'], $decoded);
  388. $encoded = "19\r\nThis is a chunked message\r\nE\r\n\nThat is cool\n\r\n0\r\n";
  389. $decoded = "This is a chunked message\nThat is cool\n";
  390. $r = $this->HttpResponse->decodeChunkedBody($encoded);
  391. $this->assertEquals($r['body'], $decoded);
  392. $this->assertEquals(false, $r['header']);
  393. $encoded = "19\r\nThis is a chunked message\r\nE;foo-chunk=5\r\n\nThat is cool\n\r\n0\r\n";
  394. $r = $this->HttpResponse->decodeChunkedBody($encoded);
  395. $this->assertEquals($r['body'], $decoded);
  396. $this->assertEquals(false, $r['header']);
  397. $encoded = "19\r\nThis is a chunked message\r\nE\r\n\nThat is cool\n\r\n0\r\nfoo-header: bar\r\ncake: PHP\r\n\r\n";
  398. $r = $this->HttpResponse->decodeChunkedBody($encoded);
  399. $this->assertEquals($r['body'], $decoded);
  400. $this->assertEquals(array('foo-header' => 'bar', 'cake' => 'PHP'), $r['header']);
  401. }
  402. /**
  403. * testDecodeChunkedBodyError method
  404. *
  405. * @expectedException SocketException
  406. * @return void
  407. */
  408. public function testDecodeChunkedBodyError() {
  409. $encoded = "19\r\nThis is a chunked message\r\nE\r\n\nThat is cool\n\r\n";
  410. $this->HttpResponse->decodeChunkedBody($encoded);
  411. }
  412. /**
  413. * testParseCookies method
  414. *
  415. * @return void
  416. */
  417. public function testParseCookies() {
  418. $header = array(
  419. 'Set-Cookie' => array(
  420. 'foo=bar',
  421. 'people=jim,jack,johnny";";Path=/accounts',
  422. 'google=not=nice'
  423. ),
  424. 'Transfer-Encoding' => 'chunked',
  425. 'Date' => 'Sun, 18 Nov 2007 18:57:42 GMT',
  426. );
  427. $cookies = $this->HttpResponse->parseCookies($header);
  428. $expected = array(
  429. 'foo' => array(
  430. 'value' => 'bar'
  431. ),
  432. 'people' => array(
  433. 'value' => 'jim,jack,johnny";"',
  434. 'path' => '/accounts',
  435. ),
  436. 'google' => array(
  437. 'value' => 'not=nice',
  438. )
  439. );
  440. $this->assertEquals($expected, $cookies);
  441. $header['Set-Cookie'][] = 'cakephp=great; Secure';
  442. $expected['cakephp'] = array('value' => 'great', 'secure' => true);
  443. $cookies = $this->HttpResponse->parseCookies($header);
  444. $this->assertEquals($expected, $cookies);
  445. $header['Set-Cookie'] = 'foo=bar';
  446. unset($expected['people'], $expected['cakephp'], $expected['google']);
  447. $cookies = $this->HttpResponse->parseCookies($header);
  448. $this->assertEquals($expected, $cookies);
  449. }
  450. /**
  451. * Test that escaped token strings are properly unescaped by HttpSocket::unescapeToken
  452. *
  453. * @return void
  454. */
  455. public function testUnescapeToken() {
  456. $this->assertEquals('Foo', $this->HttpResponse->unescapeToken('Foo'));
  457. $escape = $this->HttpResponse->tokenEscapeChars(false);
  458. foreach ($escape as $char) {
  459. $token = 'My-special-"' . $char . '"-Token';
  460. $unescapedToken = $this->HttpResponse->unescapeToken($token);
  461. $expectedToken = 'My-special-' . $char . '-Token';
  462. $this->assertEquals($expectedToken, $unescapedToken, 'Test token unescaping for ASCII ' . ord($char));
  463. }
  464. $token = 'Extreme-":"Token-" "-""""@"-test';
  465. $escapedToken = $this->HttpResponse->unescapeToken($token);
  466. $expectedToken = 'Extreme-:Token- -"@-test';
  467. $this->assertEquals($expectedToken, $escapedToken);
  468. }
  469. /**
  470. * testArrayAccess
  471. *
  472. * @return void
  473. */
  474. public function testArrayAccess() {
  475. $this->HttpResponse->httpVersion = 'HTTP/1.1';
  476. $this->HttpResponse->code = 200;
  477. $this->HttpResponse->reasonPhrase = 'OK';
  478. $this->HttpResponse->headers = array(
  479. 'Server' => 'CakePHP',
  480. 'ContEnt-Type' => 'text/plain'
  481. );
  482. $this->HttpResponse->cookies = array(
  483. 'foo' => array('value' => 'bar'),
  484. 'bar' => array('value' => 'foo')
  485. );
  486. $this->HttpResponse->body = 'This is a test!';
  487. $this->HttpResponse->raw = "HTTP/1.1 200 OK\r\nServer: CakePHP\r\nContEnt-Type: text/plain\r\n\r\nThis is a test!";
  488. $expectedOne = "HTTP/1.1 200 OK\r\n";
  489. $this->assertEquals($expectedOne, $this->HttpResponse['raw']['status-line']);
  490. $expectedTwo = "Server: CakePHP\r\nContEnt-Type: text/plain\r\n";
  491. $this->assertEquals($expectedTwo, $this->HttpResponse['raw']['header']);
  492. $expectedThree = 'This is a test!';
  493. $this->assertEquals($expectedThree, $this->HttpResponse['raw']['body']);
  494. $expected = $expectedOne . $expectedTwo . "\r\n" . $expectedThree;
  495. $this->assertEquals($expected, $this->HttpResponse['raw']['response']);
  496. $expected = 'HTTP/1.1';
  497. $this->assertEquals($expected, $this->HttpResponse['status']['http-version']);
  498. $expected = 200;
  499. $this->assertEquals($expected, $this->HttpResponse['status']['code']);
  500. $expected = 'OK';
  501. $this->assertEquals($expected, $this->HttpResponse['status']['reason-phrase']);
  502. $expected = array(
  503. 'Server' => 'CakePHP',
  504. 'ContEnt-Type' => 'text/plain'
  505. );
  506. $this->assertEquals($expected, $this->HttpResponse['header']);
  507. $expected = 'This is a test!';
  508. $this->assertEquals($expected, $this->HttpResponse['body']);
  509. $expected = array(
  510. 'foo' => array('value' => 'bar'),
  511. 'bar' => array('value' => 'foo')
  512. );
  513. $this->assertEquals($expected, $this->HttpResponse['cookies']);
  514. $this->HttpResponse->raw = "HTTP/1.1 200 OK\r\n\r\nThis is a test!";
  515. $this->assertSame($this->HttpResponse['raw']['header'], null);
  516. }
  517. }