think about the HTTP::Engine

|

2008-08-17

enhancements from 0.13

13:58 | はてなブックマーク - enhancements from 0.13 - think about the HTTP::Engine

I've wrote a lot of code in HTTP::Engine.

  • refactor some code
  • Interface::*: pass _connection expressly
  • purge RequestBuilder::Dummy
  • Interface::POE: do not use H::R::AsCGI
  • Interface::*: fixed some $req->uri related bugs
  • Interface::ModPerl: fixed a lot of bugs(0.13 doesn't process headers_in (^^; )
  • Interface::ModPerl: call mod_perl API directly
  • daemonize_all tests I::FCGI and I::CGI :)

hm. I've finished a lot of todoes :)

what's next?

current coverage:

2008-08-15

next plan of Middleware...

09:39 | はてなブックマーク - next plan of Middleware... - think about the HTTP::Engine

next plan is likes follow.

based on the function chain.

HTTP::Engine->new(
  handle_request => HTTP::Engine::Middleware::DoCoMoGUID::filters(\$your_handler)
)->run;
package HTTP::Engine::Middleware::DoCoMoGUID;
use Moose;
use HTML::StickyQuery;

sub filter {
    my ($code, ) = @_;

    sub {
        my $req = shift;
        my $res = $code->($req);

        if (   $res->status == 200
            && $res->content_type =~ /html/
            && not blessed $res->body
            && $res->body )
        {
            my $body = $res->body;
            $res->body(
                do {
                    my $guid = HTML::StickyQuery->new(
                        'abs' => 1,
                    );
                    $guid->sticky(
                        scalarref => \$body,
                        param     => { guid => 'ON' },
                    );
                }
            );
        }

        return $res;
    };
}

1;

hm, this idea is stolen from WSGI(python's one :-)

2008-08-11

current coverage

15:46 | はてなブックマーク - current coverage - think about the HTTP::Engine

I'm tired to writing tests.Give up!

2008-08-09

current coverage(2)

01:29 | はてなブックマーク - current coverage(2) - think about the HTTP::Engine

  • raw_body
  • _create_anon_class
|