You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried, but i could not get it to work with this library: Is it possible to do things like sending 2 responses as server response?
// init - RoadRunner is just an example
$worker = \Spiral\RoadRunner\Worker::create();
$psrFactory = new Psr17Factory();
$psr7 = new \Spiral\RoadRunner\Http\PSR7Worker(worker : $worker,
requestFactory: $psrFactory,
streamFactory : $psrFactory,
uploadsFactory: $psrFactory);
// ... other code here. now the interesting part:
$psr7->respond(status : 103,
headers : ['Link' => ['</static/css/bootstrap.min.css>; rel=preload; as=style',
'</static/js/bootstrap.bundle.min.js>; rel=preload; as=script']],
endOfStream: false);
$psr7->respond(status : 200,
body : 'My fancy HTML that took maybe 1 second to create',
endOfStream: true);
// exceptions following and so on
endOfStream would describe that the response stream shall be closed or not (which has not been implemented yet?).
The text was updated successfully, but these errors were encountered:
The PSR-7 implementation in this repository does not actually handle any of the sending. We never access the response stream. That is probably handled by the PSR7Worker instance from RoadRunner.
Have you opened an issue there? If you have the Exceptions, those might point out where the stream is actually getting closed?
I tried, but i could not get it to work with this library: Is it possible to do things like sending 2 responses as server response?
endOfStream would describe that the response stream shall be closed or not (which has not been implemented yet?).
The text was updated successfully, but these errors were encountered: