[Rt-commit] r3956 - in RTx-Atom: . html/Atom/0.3 html/Atom/0.3/Add
html/Atom/0.3/Elements lib/RT
autrijus at bestpractical.com
autrijus at bestpractical.com
Wed Oct 12 22:25:48 EDT 2005
Author: autrijus
Date: Wed Oct 12 22:25:48 2005
New Revision: 3956
Modified:
RTx-Atom/Changes
RTx-Atom/html/Atom/0.3/Add/index
RTx-Atom/html/Atom/0.3/Elements/Link
RTx-Atom/html/Atom/0.3/dhandler
RTx-Atom/lib/RT/Atom.pm
RTx-Atom/lib/RT/Atom.pod
Log:
* sync repo with cpan by request from Todd Chapman
Modified: RTx-Atom/Changes
==============================================================================
--- RTx-Atom/Changes (original)
+++ RTx-Atom/Changes Wed Oct 12 22:25:48 2005
@@ -1,3 +1,8 @@
+[Changes for 0.03 - August 4, 2004]
+
+Change all MIME types from application/x.atom+xml to
+application/atom+xml due to the IETF-AtomWG's recommendations.
+
[Changes for 0.02 - August 4, 2004]
Addressing user-defined Groups by name now works.
Modified: RTx-Atom/html/Atom/0.3/Add/index
==============================================================================
--- RTx-Atom/html/Atom/0.3/Add/index (original)
+++ RTx-Atom/html/Atom/0.3/Add/index Wed Oct 12 22:25:48 2005
@@ -20,6 +20,13 @@
my @rv;
if ($Path =~ /.*\b(\w+)s/ and $Object and my $code = $Object->can("Add$1")) {
+ if ($1 eq 'CustomFieldValue' and my $q = eval { $Object->QueueObj->Id } and $args{Field} =~ /^(\d*\D.*)$/) {
+ my $name = $1;
+ my $cf = RT::CustomField->new($session{CurrentUser});
+ $cf->LoadByNameAndQueue( Queue => $q, Name => $name );
+ $cf->LoadByNameAndQueue( Queue => 0, Name => $name ) if !$cf->Id;
+ $args{Field} = $cf if $cf->Id;
+ }
@rv = $code->($Object, %args);
$status = 200 if $rv[0];
}
Modified: RTx-Atom/html/Atom/0.3/Elements/Link
==============================================================================
--- RTx-Atom/html/Atom/0.3/Elements/Link (original)
+++ RTx-Atom/html/Atom/0.3/Elements/Link Wed Oct 12 22:25:48 2005
@@ -40,7 +40,7 @@
</%INIT>
<%ARGS>
$Relation => "alternate"
-$Type => "application/x.atom+xml"
+$Type => "application/atom+xml"
$URI => "#"
$Id => ""
$Title => ""
Modified: RTx-Atom/html/Atom/0.3/dhandler
==============================================================================
--- RTx-Atom/html/Atom/0.3/dhandler (original)
+++ RTx-Atom/html/Atom/0.3/dhandler Wed Oct 12 22:25:48 2005
@@ -14,7 +14,7 @@
my %accept = map { $_ => 1 } $r->headers_in->{'Accept'} =~ m{([^\s,]+/[^;,]+)}g;
my @encodings = $r->headers_in->{'Accept-Charset'} =~ m{([^\s,]+[^;,]*)}g;
-my $atom_client = $accept{'application/x.atom+xml'};
+my $atom_client = $accept{'application/atom+xml'} || $accept{'application/x.atom+xml'};
my $header_out = sub { $r->headers_out->add(@_) };
@@ -255,6 +255,7 @@
$ARGS{Now}->SetToNow;
my @types = qw(
+ application/atom+xml
application/x.atom+xml
application/xml
);
Modified: RTx-Atom/lib/RT/Atom.pm
==============================================================================
--- RTx-Atom/lib/RT/Atom.pm (original)
+++ RTx-Atom/lib/RT/Atom.pm Wed Oct 12 22:25:48 2005
@@ -1,5 +1,5 @@
package RT::Atom;
-$RT::Atom::VERSION = '0.02';
+$RT::Atom::VERSION = '0.03';
use strict;
Modified: RTx-Atom/lib/RT/Atom.pod
==============================================================================
--- RTx-Atom/lib/RT/Atom.pod (original)
+++ RTx-Atom/lib/RT/Atom.pod Wed Oct 12 22:25:48 2005
@@ -4,7 +4,7 @@
=head1 VERSION
-This document describes version 0.00_02 of RT::Atom, released May 19, 2004.
+This document describes version 0.03 of RT::Atom, released May 19, 2004.
=head1 DESCRIPTION
@@ -66,7 +66,7 @@
part: (The C<Accept> header will be omitted for brevity from now on.)
HEAD /Atom/0.3
- Accept: application/x.atom+xml,*/*
+ Accept: application/atom+xml,*/*
401 Authorization Required
WWW-Authenticate: WSSE realm="localhost", profile="UsernameToken"
@@ -100,7 +100,7 @@
distinguished by their C<Content-Type> headers. First is AtomEntry:
POST /Atom/0.3/Users
- Content-Type: application/x.atom+xml
+ Content-Type: application/atom+xml
<entry>
<content type="text/xml" mode="xml">
@@ -254,7 +254,7 @@
=item Accept
Specifies the content type the client is willing to process. A RT-Atom
-client must include C<application/x.atom+xml> in its C<Accept> list.
+client must include C<application/atom+xml> in its C<Accept> list.
=item Accept-Charset
@@ -451,7 +451,7 @@
Or this:
POST /Atom/0.3/RT-Groups
- Content-Type: application/x.atom+xml
+ Content-Type: application/atom+xml
<entry>
<content type="text/xml" mode="xml">
More information about the Rt-commit
mailing list