makeStandardsCompliant() public method

It is recommended to call this method before the response is sent and Flow does so by default in its built-in HTTP request handler.
public makeStandardsCompliant ( Request $request ) : void
$request Request The corresponding request
return void
 /**
  * RFC 2616 / 14.28 (If-Unmodified-Since)
  *
  * @test
  */
 public function makeStandardsCompliantReturns412StatusIfUnmodifiedSinceDoesNotMatch()
 {
     $request = Request::create(new Uri('http://localhost'));
     $response = new Response();
     $unmodifiedSince = \DateTime::createFromFormat(DATE_RFC2822, 'Tue, 15 May 2012 09:00:00 GMT');
     $lastModified = \DateTime::createFromFormat(DATE_RFC2822, 'Sun, 20 May 2012 08:00:00 UTC');
     $request->setHeader('If-Unmodified-Since', $unmodifiedSince);
     $response->setHeader('Last-Modified', $lastModified);
     $response->makeStandardsCompliant($request);
     $this->assertSame(412, $response->getStatusCode());
     $response = new Response();
     $unmodifiedSince = \DateTime::createFromFormat(DATE_RFC2822, 'Tue, 15 May 2012 09:00:00 GMT');
     $lastModified = \DateTime::createFromFormat(DATE_RFC2822, 'Tue, 15 May 2012 08:00:00 UTC');
     $request->setHeader('If-Unmodified-Since', $unmodifiedSince);
     $response->setHeader('Last-Modified', $lastModified);
     $response->makeStandardsCompliant($request);
     $this->assertSame(200, $response->getStatusCode());
 }