Skip to content

Conversation

@SamvelG
Copy link

@SamvelG SamvelG commented Mar 8, 2015

Output buffers must be properly flushed so the following example could work as expected.
/**

  • Example
    */
    // Creates new response object
    $response = new Response(
    'Not found!',
    404,
    array('Content-Type' => 'text/html')
    );
    // Adds HTTP headers required to close the connection
    $response->headers->add(
    array(
    'Connection' => 'close',
    'Content-Length' => strlen($response->getContent()),
    )
    );
    // Sends HTTP response
    $response->send();
@prisis
Copy link

prisis commented Apr 13, 2015

@SamvelG you should issue Pull Request against https://github.com/symfony/symfony. This repo is read-only.

@lyrixx
Copy link
Member

lyrixx commented Sep 26, 2015

@SamvelG Could you close the PR?

@fabpot fabpot closed this Sep 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants