abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From M Harris <mdange...@yahoo.com>
Subject General Question about IDs
Date Fri, 02 May 2008 23:56:36 GMT
This is not necessarily about Abdera, but about the Atom Publishing Protocol in general regarding
entry Ids.  I know there are some people on the mailing list who have developed their sites
using Abdera and Atom.  Are you storing the Entry Ids in a database or other structure?  I
was wondering how exactly to handle editing a resource.

I guess I am wondering how to ensure that the link during an edit of a resource is infact
that Entry itself the client is trying to edit.

Taken from an article online just for reference:

PUT /blog/entries/1 HTTP/1.1
Host: example.org
Content-Type: application/atom+xml; charset=utf-8
Content-Length: nnnn
If-Match: "/blog/entries/1?1"
If-Unmodified-Since: Sat, 12 Aug 2006 13:40:03 GMT

<?xml version="1.0" ?>
<entry xmlns="http://www.w3.org/2005/Atom" >
  <title>Atom-Powered Robots Run Crazy</title>
  <link href="http://example.org/2003/12/13/atom03"/>
  <link rel="edit" href="http://example.org/blog/entries/1" />
  <summary>Some different text.</summary>

How should it know that 

 and the entry 

Mean the same? In this case the Id happens to be the URL of the entry but from what I have
read the id does not have to be any part of the URL.  If someone were to do a PUT to the same
URL but with this ID (2007 instead of 2008)

 Does it overwrite the id?  

Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message