CGI--Application icon indicating copy to clipboard operation
CGI--Application copied to clipboard

Add PSGI Streaming - Updated

Open miketonks opened this issue 11 years ago • 5 comments

Refactored so that when $body is a subref, we just return it.

Updated the tests and docs to reflect this.

I've still a minor question around the headers:

   #my $writer = $respond->([200, ['Content-Type' => 'text/plain']]);   # this works fine
   #my $writer = $respond->([ $self->query->psgi_header ]);             # this doesn't work?
   my $writer = $respond->([ $self->_send_psgi_headers ]);              # this works, but uses an internal call - perhaps it should be made public?

miketonks avatar Mar 09 '13 19:03 miketonks

Thanks for your continued work on this.

I'm not sure why $self->query->psgi_header wouldn't work. Let's make _send_psgi_headers public. Could you make that change as well? I would stick the docs under "More Application Methods", perhaps document it like this:

my ($http_status_code, $headers_aref) =  $self->send_psgi_headers;

This method generates PSGI headers based on header_type and header_props. It is normally called automatically for you. However, you may call it directly if you are using the coderef return value option, and writing your own callback to generate the headers.

markstos avatar Mar 20 '13 01:03 markstos

Hi Mark,

Bump: I think my last commit should close this issue, and give us a release candidate?

miketonks avatar May 01 '13 09:05 miketonks

Thanks for the reminder. Yes, this is in my court, and I agree that little remains to do.

markstos avatar May 01 '13 15:05 markstos

Hi Mark, I hope you're well. Is this still on the cards?

miketonks avatar Jan 16 '14 20:01 miketonks

Hi Mike!

Mark has asked us to take over the cgi-app Dev from him. I'm catching up with what projects he had in progress, so I don't yet know what the status of this effort was. I will take a look at his notes and see where we're at.

Jesse

On Jan 16, 2014, at 3:48 PM, miketonks [email protected] wrote:

Hi Mark, I hope you're well. Is this still on the cards?

— Reply to this email directly or view it on GitHubhttps://github.com/markstos/CGI--Application/pull/8#issuecomment-32545375 .

jerlbaum avatar Jan 17 '14 00:01 jerlbaum