Skip to content

[2.1] Transport agnostic HTTP streaming #3177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
igorw opened this issue Jan 24, 2012 · 3 comments
Closed

[2.1] Transport agnostic HTTP streaming #3177

igorw opened this issue Jan 24, 2012 · 3 comments

Comments

@igorw
Copy link
Contributor

igorw commented Jan 24, 2012

About a month ago streaming responses (#2935) landed in master. My concern with the current implementation is that it has no transport abstraction. It will always assume a CGI-like environment where echo delivers to the client.

The most important feature of Symfony2 is the HTTP abstraction it provides. Ideally we would have streaming supported in this abstraction as well. This would allow using Symfony2 with other web servers, such as AiP or mongrel2.

I have started some work on this in my output-stream branch. @fabpot if you like this approach it would be great if you could complete it, as I really don't have the time right now.

@phuedx
Copy link

phuedx commented Mar 11, 2012

@igorw I would love to see Symfony go one step further and use a transport abstraction layer both for receiving the request and sending the response. In the following contrived example the Request and Response aren't aware of the transport mechanism:

<?php
// app.php

require_once __DIR__.'/../app/bootstrap.php.cache';
require_once __DIR__.'/../app/AppKernel.php';
//require_once __DIR__.'/../app/AppCache.php';

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Transport\Mongrel2Transport;

$kernel = new AppKernel('prod', false);
$kernel->loadClassCache();
//$kernel = new AppCache($kernel);
$transport = new Mongrel2Transport('prod');
//$request = Request::createFromGlobals();
$request = $transport->getRequest();
$response = $kernel->handle($request);
//$response->send();
$transport->send($response);
$kernel->terminate($request, $response);

@stof
Copy link
Member

stof commented Apr 4, 2012

@fabpot ping

@fabpot
Copy link
Member

fabpot commented Jul 13, 2012

Closing in favor of the related PR #4146

@fabpot fabpot closed this as completed Jul 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants