[wp-xmlrpc] Re: [wp-hackers] AtomPub support

marumoto marumoto at gmail.com
Tue Feb 19 11:19:23 GMT 2008


> For WordPress.com, AtomPub support should be turned on.  I just made
> a few small changes, the wp-app.php on wordpress.com is now 100% in
> sync with the code from wordpress.org.

Really? Then, we have other problems. First of all, WordPress.com does not
return any entires in the collection feed at all. I noticed this a few week ago.
It used to work.

Since no one seems to care to check themselves, I run the APE against
WordPress.com.

# PLEASE NOTE that APE does NOT check everything.

Here is the output from APE.

--------------------------------------------------------------------------------------------------
Summary: 2 errors, 4 warnings.

   1. TESTING: Service document and collections.
   2.

      ✓ Retrieval of Service Document: it exists and is served
properly. [Dialog]
   3.

      Found these collections:
          *

            'WordPress Posts' accepts application/atom+xml;type=entry
          *

            'WordPress Media' accepts image/*, audio/*, video/*
   4.

      Will use collection 'WordPress Posts' for entry creation.
   5.

      ✓ Page 1 of Entry collection: it exists and is served properly. [Dialog]
   6.

      Page 1 of Entry collection has no entries.
   7.

      ✓ Entry collection has correct app:edited value order.
   8.

      TESTING: Entry-posting basics.
   9.

      ✓ Posting of new entry to the Entries collection reported
success, Location: https://HOGE.wordpress.com/wp-app.php/post/135
[Dialog]
  10.

      Examining the new entry as returned in the POST response
  11.

      ? 'title' has type='text' in entry as posted, type='html' in
Returned entry.
  12.

      ✓ Provided categories included in Returned entry.
  13.

      ? Server discarded foreign markup in Returned entry.
  14.

      ✓ Retrieval of newly created entry: it exists and is served
properly. [Dialog]
  15.

      Examining the new entry as retrieved using Location header in
POST response:
  16.

      ✓ Client-provided slug 'ape-1794' was used in server-generated URI.
  17.

      ? 'title' has type='text' in entry as posted, type='html' in
Retrieved entry.
  18.

      ✓ Provided categories included in Retrieved entry.
  19.

      ? Server discarded foreign markup in Retrieved entry.
  20.

      ✓ About to check https://HOGE.wordpress.com/wp-app.php/posts
  21.

      ✓ Page 1 of Can't find entry in collection: it exists and is
served properly. [Dialog]
  22.

      Page 1 of Can't find entry in collection has no entries.
  23.

      ✓ Can't find entry in collection has correct app:edited value order.
  24.

      ! New entry didn't show up in the collections feed.
  25.

      TESTING: Collection re-ordering after PUT.
  26.

      ✓ Page 1 of Entries with multi-post: it exists and is served
properly. [Dialog]
  27.

      Page 1 of Entries with multi-post has no entries.
  28.

      ✓ Entries with multi-post has correct app:edited value order.
  29.

      ✓ Entries correctly ordered after multi-post.
  30.

      ! Ouch! Ape fall down go boom; details: undefined method `link'
for nil:NilClass
      NoMethodError
      ./ape.rb:302:in `test_sorting'./ape.rb:133:in
`might_fail'./ape.rb:52:in `check'go.rb:23



Recorded client/server dialogs
Posting new entry
To server:
POST /wp-app.php/posts HTTP/1.1\r
Slug: ape-1794\r
Accept: */*\r
Content-Type: application/atom+xml;type=entry\r
Content-Length: 901\r
Host: HOGE.wordpress.com\r
\r
<?xml version='1.0' ?>
<entry xmlns='http://www.w3.org/2005/Atom'>
<title>From the &lt;APE&gt; (\343\202\265\343\203\253)</title>
<author><name>The Atom Protocol Exerciser</name></author>
<id>tag:tbray.org,2005:65922824557769886958490321312</id>
<updated>2008-02-19T02:56:12-08:00</updated>
<link href='http://www.tbray.org/ape'/> <summary type='html'>Summary
from the &lt;b>&amp;lt;&amp;nbsp;APE&amp;nbsp;>&lt;/b> at
2008-02-19T02:56:12-08:00</summary>
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'><p>A
test post from the &lt;APE&gt; at 2008-02-19T02:56:12-08:00</p><p>If
you see this in an entry, it's probably a left-over from an
unsuccessful Ape run; feel free to delete it.</p></div></content>
<dc:subject xmlns:dc='http://purl.org/dc/elements/1.1/'>Simians</dc:subject>
<atom:category term='Blogroll' scheme='http://HOGE.wordpress.com'
xmlns:atom='http://www.w3.org/2005/Atom'/></entry>
POST /wp-app.php/posts HTTP/1.1\r
Slug: ape-1794\r
Accept: */*\r
Content-Type: application/atom+xml;type=entry\r
Authorization: Basic **************=\r
Content-Length: 901\r
Host: HOGE.wordpress.com\r
\r
<?xml version='1.0' ?>
<entry xmlns='http://www.w3.org/2005/Atom'>
<title>From the &lt;APE&gt; (\343\202\265\343\203\253)</title>
<author><name>The Atom Protocol Exerciser</name></author>
<id>tag:tbray.org,2005:65922824557769886958490321312</id>
<updated>2008-02-19T02:56:12-08:00</updated>
<link href='http://www.tbray.org/ape'/> <summary type='html'>Summary
from the &lt;b>&amp;lt;&amp;nbsp;APE&amp;nbsp;>&lt;/b> at
2008-02-19T02:56:12-08:00</summary>
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'><p>A
test post from the &lt;APE&gt; at 2008-02-19T02:56:12-08:00</p><p>If
you see this in an entry, it's probably a left-over from an
unsuccessful Ape run; feel free to delete it.</p></div></content>
<dc:subject xmlns:dc='http://purl.org/dc/elements/1.1/'>Simians</dc:subject>
<atom:category term='Blogroll' scheme='http://HOGE.wordpress.com'
xmlns:atom='http://www.w3.org/2005/Atom'/></entry>
From Server:
HTTP/1.1 401 Unauthorized\r
Vary: Cookie\r
X-hacker: If you're reading this, you should visit automattic.com/jobs
and apply to join the fun, mention this header.\r
Expires: Wed, 11 Jan 1984 05:00:00 GMT\r
Last-Modified: Tue, 19 Feb 2008 10:56:13 GMT\r
Cache-Control: no-cache, must-revalidate, max-age=0\r
Pragma: no-cache\r
WWW-Authenticate: Basic realm="WordPress Atom Protocol"\r
Content-type: text/html;charset=utf-8\r
Content-Length: 201\r
Date: Tue, 19 Feb 2008 10:56:13 GMT\r
Server: LiteSpeed\r
Connection: close\r
\r
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>401 Unauthorized</title>
</head>
<body>
<h1>401 Unauthorized</h1>
<p>Credentials required.</p>
</body>
</html>
HTTP/1.1 201 Created\r
Vary: Cookie\r
X-hacker: If you're reading this, you should visit automattic.com/jobs
and apply to join the fun, mention this header.\r
Content-Type: application/atom+xml\r
Content-Location: https://HOGE.wordpress.com/wp-app.php/post/135\r
Location: https://HOGE.wordpress.com/wp-app.php/post/135\r
Content-Length: 1128\r
Date: Tue, 19 Feb 2008 10:56:14 GMT\r
Server: LiteSpeed\r
Connection: close\r
\r
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:app="http://www.w3.org/2007/app" xml:lang="">
    <id>http://HOGE.wordpress.com/2008/02/19/ape-1794/</id>
    <title type="html"><![CDATA[From the
&lt;APE&gt;&nbsp;(\343\202\265\343\203\253)]]></title>
    <updated>2008-02-19T10:56:14Z</updated>
    <published>2008-02-19T10:56:14Z</published>
    <app:edited>2008-02-19T10:56:14Z</app:edited>
    <app:control>
        <app:draft>no</app:draft>
    </app:control>
    <author>
        <name>HOGE</name>
        <uri>http://HOGE.wordpress.com/</uri>
    </author>
    <link href="http://HOGE.wordpress.com/2008/02/19/ape-1794/" />
    <content type="xhtml"><div
xmlns='http://www.w3.org/1999/xhtml'><div><p>A test post from the
&lt;APE&gt; at 2008-02-19T02:56:12-08:00</p><p>If you see this in an
entry, it&apos;s probably a left-over from an unsuccessful Ape run;
feel free to delete it.</p></div></div></content>
    <link rel="edit" href="https://HOGE.wordpress.com/wp-app.php/post/135" />
    <category scheme="http://HOGE.wordpress.com" term="Blogroll" />
    <summary type="html"><![C
DATA[Summary from the <b>&lt;&nbsp;APE&nbsp;&gt;</b> at
2008-02-19T02:56:12-08:00]]></summary>
</entry>
Page 1 of Entries with multi-post
To server:
GET /wp-app.php/posts HTTP/1.1\r
Accept: */*\r
Host: HOGE.wordpress.com\r
\r
From Server:
HTTP/1.1 200 OK\r
Vary: Cookie\r
X-hacker: If you're reading this, you should visit automattic.com/jobs
and apply to join the fun, mention this header.\r
X-Pingback: http://HOGE.wordpress.com/xmlrpc.php\r
Expires: Wed, 11 Jan 1984 05:00:00 GMT\r
Last-Modified: Tue, 19 Feb 2008 10:56:12 GMT\r
Cache-Control: no-cache, must-revalidate, max-age=0\r
Pragma: no-cache\r
Content-Type: application/atom+xml\r
Content-Disposition: attachment; filename=atom.xml\r
Content-Length: 754\r
Date: Tue, 19 Feb 2008 10:56:26 GMT\r
Server: LiteSpeed\r
Connection: close\r
\r
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:app="http://www.w3.org/2007/app" xml:lang="">
<id>https://HOGE.wordpress.com/wp-app.php/posts</id>
<updated>2008-02-05T23:36:26Z</updated>
<title type="text">hepcat</title>
<subtitle type="text">Just another WordPress.com weblog</subtitle>
<link rel="first" type="application/atom+xml"
href="https://HOGE.wordpress.com/wp-app.php/posts" />
<link rel="last" type="application/atom+xml"
href="https://HOGE.wordpress.com/wp-app.php/posts" />
<link rel="self" type="application/atom+xml"
href="https://HOGE.wordpress.com/wp-app.php/posts" />
<rights type="text">Copyright 2008</rights>
<generator uri="http://wordpress.org/" version="MU">WordPress</generator>
</feed>
Page 1 of Entry collection
To server:
GET /wp-app.php/posts HTTP/1.1\r
Accept: */*\r
Host: HOGE.wordpress.com\r
\r
GET /wp-app.php/posts HTTP/1.1\r
Accept: */*\r
Authorization: Basic ******************=\r
Host: HOGE.wordpress.com\r
\r
From Server:
HTTP/1.1 401 Unauthorized\r
Vary: Cookie\r
X-hacker: If you're reading this, you should visit automattic.com/jobs
and apply to join the fun, mention this header.\r
Expires: Wed, 11 Jan 1984 05:00:00 GMT\r
Last-Modified: Tue, 19 Feb 2008 10:56:12 GMT\r
Cache-Control: no-cache, must-revalidate, max-age=0\r
Pragma: no-cache\r
WWW-Authenticate: Basic realm="WordPress Atom Protocol"\r
Content-type: text/html;charset=utf-8\r
Content-Length: 201\r
Date: Tue, 19 Feb 2008 10:56:12 GMT\r
Server: LiteSpeed\r
Connection: close\r
\r
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>401 Unauthorized</title>
</head>
<body>
<h1>401 Unauthorized</h1>
<p>Credentials required.</p>
</body>
</html>
HTTP/1.1 200 OK\r
Vary: Cookie\r
X-hacker: If you're reading this, you should visit automattic.com/jobs
and apply to join the fun, mention this header.\r
X-Pingback: http://HOGE.wordpress.com/xmlrpc.php\r
Expires: Wed, 11 Jan 1984 05:00:00 GMT\r
Last-Modified: Tue, 19 Feb 2008 10:56:12 GMT\r
Cache-Control: no-cache, must-revalidate, max-age=0\r
Pragma: no-cache\r
Content-Type: application/atom+xml\r
Content-Disposition: attachment; filename=atom.xml\r
Content-Length: 754\r
Date: Tue, 19 Feb 2008 10:56:12 GMT\r
Server: LiteSpeed\r
Connection: close\r
\r
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:app="http://www.w3.org/2007/app" xml:lang="">
<id>https://HOGE.wordpress.com/wp-app.php/posts</id>
<updated>2008-02-05T23:36:26Z</updated>
<title type="text">hepcat</title>
<subtitle type="text">Just another WordPress.com weblog</subtitle>
<link rel="first" type="application/atom+xml"
href="https://HOGE.wordpress.com/wp-app.php/posts" />
<link rel="last" type="application/atom+xml"
href="https://HOGE.wordpress.com/wp-app.php/posts" />
<link rel="self" type="application/atom+xml"
href="https://HOGE.wordpress.com/wp-app.php/posts" />
<rights type="text">Copyright 2008</rights>
<generator uri="http://wordpress.org/" version="MU">WordPress</generator>
</feed>
Page 1 of Can't find entry in collection
To server:
GET /wp-app.php/posts HTTP/1.1\r
Accept: */*\r
Host: HOGE.wordpress.com\r
\r
From Server:
HTTP/1.1 200 OK\r
Vary: Cookie\r
X-hacker: If you're reading this, you should visit automattic.com/jobs
and apply to join the fun, mention this header.\r
X-Pingback: http://HOGE.wordpress.com/xmlrpc.php\r
Expires: Wed, 11 Jan 1984 05:00:00 GMT\r
Last-Modified: Tue, 19 Feb 2008 10:56:12 GMT\r
Cache-Control: no-cache, must-revalidate, max-age=0\r
Pragma: no-cache\r
Content-Type: application/atom+xml\r
Content-Disposition: attachment; filename=atom.xml\r
Content-Length: 754\r
Date: Tue, 19 Feb 2008 10:56:16 GMT\r
Server: LiteSpeed\r
Connection: close\r
\r
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:app="http://www.w3.org/2007/app" xml:lang="">
<id>https://HOGE.wordpress.com/wp-app.php/posts</id>
<updated>2008-02-05T23:36:26Z</updated>
<title type="text">hepcat</title>
<subtitle type="text">Just another WordPress.com weblog</subtitle>
<link rel="first" type="application/atom+xml"
href="https://HOGE.wordpress.com/wp-app.php/posts" />
<link rel="last" type="application/atom+xml"
href="https://HOGE.wordpress.com/wp-app.php/posts" />
<link rel="self" type="application/atom+xml"
href="https://HOGE.wordpress.com/wp-app.php/posts" />
<rights type="text">Copyright 2008</rights>
<generator uri="http://wordpress.org/" version="MU">WordPress</generator>
</feed>
Retrieval of Service Document
To server:
GET /wp-app.php/service HTTP/1.1\r
Accept: */*\r
Host: HOGE.wordpress.com\r
\r
GET /wp-app.php/service HTTP/1.1\r
Accept: */*\r
Authorization: Basic **************=\r
Host: HOGE.wordpress.com\r
\r
From Server:
HTTP/1.1 401 Unauthorized\r
Vary: Cookie\r
X-hacker: If you're reading this, you should visit automattic.com/jobs
and apply to join the fun, mention this header.\r
Expires: Wed, 11 Jan 1984 05:00:00 GMT\r
Last-Modified: Tue, 19 Feb 2008 10:56:11 GMT\r
Cache-Control: no-cache, must-revalidate, max-age=0\r
Pragma: no-cache\r
WWW-Authenticate: Basic realm="WordPress Atom Protocol"\r
Content-type: text/html;charset=utf-8\r
Content-Length: 201\r
Date: Tue, 19 Feb 2008 10:56:11 GMT\r
Server: LiteSpeed\r
Connection: close\r
\r
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>401 Unauthorized</title>
</head>
<body>
<h1>401 Unauthorized</h1>
<p>Credentials required.</p>
</body>
</html>
HTTP/1.1 200 OK\r
Vary: Cookie\r
X-hacker: If you're reading this, you should visit automattic.com/jobs
and apply to join the fun, mention this header.\r
Content-Type: application/atomsvc+xml\r
Content-Disposition: attachment; filename=atom.xml\r
Content-Length: 699\r
Date: Tue, 19 Feb 2008 10:56:12 GMT\r
Server: LiteSpeed\r
Connection: close\r
\r
<?xml version="1.0" encoding="utf-8"?>
<service xmlns="http://www.w3.org/2007/app"
xmlns:atom="http://www.w3.org/2005/Atom">
<workspace>
<atom:title>WordPress Workspace</atom:title>
<collection href="https://HOGE.wordpress.com/wp-app.php/posts">
<atom:title>WordPress Posts</atom:title>
<accept>application/atom+xml;type=entry</accept>
<categories href="https://HOGE.wordpress.com/wp-app.php/categories" />
</collection>
<collection href="https://HOGE.wordpress.com/wp-app.php/attachments">
<atom:title>WordPress Media</atom:title>
<accept>image/*</accept><accept>audio/*</accept><accept>video/*</accept>
</collection>
</workspace>
</service>
Retrieval of newly created entry
To server:
GET /wp-app.php/post/135 HTTP/1.1\r
Accept: */*\r
Host: HOGE.wordpress.com\r
\r
GET /wp-app.php/post/135 HTTP/1.1\r
Accept: */*\r
Authorization: Basic **************k=\r
Host: HOGE.wordpress.com\r
\r
From Server:
HTTP/1.1 401 Unauthorized\r
Vary: Cookie\r
X-hacker: If you're reading this, you should visit automattic.com/jobs
and apply to join the fun, mention this header.\r
Expires: Wed, 11 Jan 1984 05:00:00 GMT\r
Last-Modified: Tue, 19 Feb 2008 10:56:15 GMT\r
Cache-Control: no-cache, must-revalidate, max-age=0\r
Pragma: no-cache\r
WWW-Authenticate: Basic realm="WordPress Atom Protocol"\r
Content-type: text/html;charset=utf-8\r
Content-Length: 201\r
Date: Tue, 19 Feb 2008 10:56:15 GMT\r
Server: LiteSpeed\r
Connection: close\r
\r
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>401 Unauthorized</title>
</head>
<body>
<h1>401 Unauthorized</h1>
<p>Credentials required.</p>
</body>
</html>
HTTP/1.1 200 OK\r
Vary: Cookie\r
X-hacker: If you're reading this, you should visit automattic.com/jobs
and apply to join the fun, mention this header.\r
Content-Type: application/atom+xml\r
Content-Disposition: attachment; filename=atom.xml\r
Content-Length: 1166\r
Date: Tue, 19 Feb 2008 10:56:15 GMT\r
Server: LiteSpeed\r
Connection: close\r
\r
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:app="http://www.w3.org/2007/app" xml:lang="">
    <id>http://HOGE.wordpress.com/2008/02/19/ape-1794/</id>
    <title type="html"><![CDATA[From the
&lt;APE&gt;&nbsp;(\343\202\265\343\203\253)]]></title>
    <updated>2008-02-19T10:56:14Z</updated>
    <published>2008-02-19T10:56:14Z</published>
    <app:edited>2008-02-19T10:56:14Z</app:edited>
    <app:control>
        <app:draft>no</app:draft>
    </app:control>
    <author>
        <name>HOGE</name>
        <uri>http://HOGE.wordpress.com/</uri>
    </author>
    <link href="http://HOGE.wordpress.com/2008/02/19/ape-1794/" />
    <content type="xhtml"><div
xmlns='http://www.w3.org/1999/xhtml'><div><p>A test post from the
&lt;APE&gt; at 2008-02-19T02:56:12-08:00</p><p>If you see this in an
entry, it&apos;s probably a left-over from an unsuccessful Ape run;
feel free to delete it.</p></div></div></content>
    <link rel="edit" href="https://HOGE.wordpress.com/wp-app.php/post/135" />
    <category scheme="http://HOGE.wordpress.com" term="
Blogroll" />
    <summary type="html"><![CDATA[Summary from the
<b>&lt;&nbsp;APE&nbsp;&gt;</b> at
2008-02-19T02:56:12-08:00]]></summary>
</entry>




--------------------------------------------------------------------------------------------------



On Feb 19, 2008 2:21 AM, Joseph Scott <joseph at randomnetworks.com> wrote:
>
> On Feb 16, 2008, at 8:14 PM, marumoto wrote:
>
> > follow up on the WP's AtomPub support.
> >
> > I released the Atom interop testing client.
> > http://www.witha.jp/eXeries/software/
> > feedback much appreciated.
> >
> > Anyway, does anyone confirm this?
> >
> >  1. Malformed XML error when GETing a media link entry.
> >  2. 404 Not Found error on GETing a category and a collection
> > document if "WordPress address" and "Blog address" are different.
> >  3. Entry's published and Edited time stamp is always the same.
> > published date should stay the same.
> >
> > I confirmed this same behavior at wordpress.com as well.
> > (although AtomPub at wordpress.com has stopped working a few weeks
> > ago)
>
>
> While getting AtomPub support improved in WP we tested against Tim's
> APE: http://www.tbray.org/ape/.  So my first question would be, what
> were the results of the equivalent APE run?  Next, are you running
> these tests against -trunk?  I'd have to double check, but I think
> that some of these issues have been resolved already.
>
> For WordPress.com, AtomPub support should be turned on.  I just made
> a few small changes, the wp-app.php on wordpress.com is now 100% in
> sync with the code from wordpress.org.
>
> --
> Joseph Scott
> http://joseph.randomnetworks.com/
>
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>


More information about the wp-xmlrpc mailing list