markstos / CGI--Application

A Perl framework for building reusable web-applications
http://www.cgi-app.org/
22 stars 13 forks source link

Add PSGI Streaming - Updated #8

Open miketonks opened 11 years ago

miketonks commented 11 years ago

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?
markstos commented 11 years ago

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.

miketonks commented 11 years ago

Hi Mark,

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

markstos commented 11 years ago

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

miketonks commented 10 years ago

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

jerlbaum commented 10 years ago

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 notifications@github.com 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 .