<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -38,9 +38,11 @@ end
 # Create a new entry.
 post '/entries/new' do
   @entry = Entry.create(params)
+  # 201 Created, with a Location header pointing to the created resource. See
+  # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.2
+  status 201
+  header 'Location' =&gt; &quot;/entries/#{@entry.slug}&quot;
   body &quot;/entries/#{@entry.slug}&quot;
-  # FIXME: We could -- no, should -- return a &quot;201 Created&quot; status code here.
-  # See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.2
 end
 
 # Retrieve an entry, as HTML.</diff>
      <filename>app/controllers/entries.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9da9f1c960858a063e5504ac0dde93770799aa70</id>
    </parent>
  </parents>
  <author>
    <name>JW</name>
    <email>JW00000@gmail.com</email>
  </author>
  <url>http://github.com/jw-00000/sinatra-blog/commit/fd6af33cffb5c201ead1dc4aae1eb04f6e308204</url>
  <id>fd6af33cffb5c201ead1dc4aae1eb04f6e308204</id>
  <committed-date>2008-09-04T13:19:16-07:00</committed-date>
  <authored-date>2008-09-04T13:19:16-07:00</authored-date>
  <message>When creating a new entry, return a 201 HTTP status code and a Location header pointing to the
created resource.</message>
  <tree>72dc15dc1e35859b1e8709f698748e7de3f0df6a</tree>
  <committer>
    <name>JW</name>
    <email>JW00000@gmail.com</email>
  </committer>
</commit>
