Changeset 180

Show
Ignore:
Timestamp:
03/07/07 16:35:59 (2 years ago)
Author:
ingy
Message:
 r3475@skinny:  ingy | 2007-03-07 16:34:08 -0800
 Chris Dent and Ingy wrote an initial REST plugin for kwiki based on
 Socialtext's model
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/core/Spoon/lib/Spoon/Headers.pm

    r45 r180  
    22use Spoon::Base -Base; 
    33 
     4field status => '200 OK'; 
    45field content_type => 'text/html'; 
    56field charset => 'UTF-8'; 
     
    1314    $self->utf8_encode($headers); 
    1415    print $headers; 
     16} 
     17 
     18sub set_headers { 
     19    my $headers = shift; 
     20    for my $key (keys %$headers) { 
     21        my $method = $key; 
     22        $method =~ s/^-//; 
     23        $method = 'content_type' if $method eq 'type'; 
     24        $self->$method($headers->{$key}) 
     25          if $self->can($method); 
     26    } 
    1527} 
    1628 
     
    3042sub value { 
    3143    ( 
     44        -status => $self->status, 
    3245        $self->hub->cookie->set_cookie_headers, 
    3346        -charset => $self->charset, 
  • trunk/src/plugins/modules.mk

    r167 r180  
    150150        Kwiki/FastCGI.pm \ 
    151151        Kwiki/Footnote.pm \ 
     152        Kwiki/GoogleMaps.pm \ 
    152153        Kwiki/OpenSearch.pm \ 
    153154        Kwiki/TypeKey.pm \ 
    154155        Kwiki/URLBL.pm \ 
    155156        Kwiki/IRCMode.pm \ 
     157        Kwiki/Rest.pm \ 
    156158        Kwiki/AccessBlacklist.pm \ 
    157159        Kwiki/BabelTest.pm \