Show me the code! – By Davanum Srinivas

September 24, 2007

Bug in APE? Testing my novice APP understanding

Filed under: Uncategorized — Davanum Srinivas @ 4:29 pm

Tim, I was looking at Abdera code and was running APE tests against it. Found a potential issue in APE (ape.rb around line 314) which is the ‘Updating mini-entry with PUT’ test. APE fetches entry “Entry Mini Two” which looks like this

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title type="text">Entry Mini Two</title>
	<author>
		<name>EM</name>
	</author>
	<id>urn:uuid:A6DA66541A8045AE221190666650124</id>
	<updated>2007-09-24T20:44:10.116Z</updated>
	<content type="text">Content of Mini Two</content>
	<link href="feed/urn:uuid:A6DA66541A8045AE221190666650124" rel="edit"/>
	<source>
		<id>tag:example.org,2006:feed</id>
		<title type="text">Simple</title>
		<updated>2007-09-24T20:44:12.401Z</updated>
		<link href=""/>
		<link href="" rel="self"/>
		<author>
			<name>Simple</name>
		</author>
	</source>
</entry>

But when it issues a put for “Mini-4” it changes the atom id and sends a put with the following:

PUT /abdera-webapp/atom/feed/urn:uuid:A6DA66541A8045AE221190666650124 HTTP/1.1
Accept: */*
If-Match: "ecdd97954f4a00231c31f2ac37e4aace"
Content-Type: application/atom+xml;type=entry
Content-Length: 288
Host: www-us.wso2.com:8088

<?xml version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title>Entry Mini-4</title>
	<author>
		<name>EM</name>
	</author>
	<id>tag:tbray.org,2005:542231791503569274552692235775</id>
	<updated>2007-09-24T13:44:39-07:00</updated>
	<content>Content of Mini-4</content>
</entry>

and Abdera bravely replies back with a 409 which APE logs as a fault. Am i reading this right?

thanks,
dims

1 Comment »

  1. Tim, Thanks for fixing Ape. Works like a charm.

    Anyone interested, take a peek at the traffic on atom-protocol mailing list.

    Comment by Davanum Srinivas — September 25, 2007 @ 10:20 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: