/[Frey]/trunk/lib/Frey/Mojo.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/Mojo.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1046 by dpavlin, Wed Apr 22 22:01:06 2009 UTC revision 1148 by dpavlin, Wed Jul 1 17:46:35 2009 UTC
# Line 63  sub handler { Line 63  sub handler {
63          # rewrite URL          # rewrite URL
64          Frey::CouchAPI->rewrite_urls( $tx );          Frey::CouchAPI->rewrite_urls( $tx );
65    
66          if ( $self->static->dispatch($tx) ) {          if ( ! $self->static->dispatch($tx) ) {
67  #               warn "# static ",dump( $tx );  #               warn "# static ",dump( $tx );
68                  return $tx;                  return $tx;
69          }          }
# Line 75  sub handler { Line 75  sub handler {
75                  $body .= join("\n", @_);                  $body .= join("\n", @_);
76          };          };
77    
78          my $url = $tx->req->url->to_string;          my $url = $tx->req->url->to_abs->to_string;
79          my $params = $tx->req->params->to_hash;          my $params = $tx->req->params->to_hash;
80    
81          my $referer = $tx->req->content->headers->header('Referer');          my $referer = $tx->req->content->headers->header('Referer');
82          my $ajax = $tx->req->content->headers->header('X-Requested-With');          my $ajax = $tx->req->content->headers->header('X-Requested-With');
83          warn "# referer $referer\n";          warn "# referer $referer\n";
84          warn "# headers = ", dump( $tx->req->content->headers );  #       warn "## headers = ", dump( $tx->req->content->headers );
85    
86          if ( $referer =~ m{/_utils} || $ajax =~ m{XMLHttpRequest}i ) {          if ( $referer =~ m{/_utils} || $ajax =~ m{XMLHttpRequest}i ) {
87                  return Frey::CouchAPI->dispatch( $tx );                  return Frey::CouchAPI->dispatch( $tx );

Legend:
Removed from v.1046  
changed lines
  Added in v.1148

  ViewVC Help
Powered by ViewVC 1.1.26