commit 89d8dda9ec99ed043b5d3e10cd959f0317739868
Author: Benjamin Melançon <ben@agaric.com>
Date:   Tue May 1 23:15:00 2012 -0400

    Add accepted media type application/atom+xml without 'entry'
    
    Also, modified it so type passed in would show in error message passed out.

diff --git a/atompub_base.inc b/atompub_base.inc
index 6322511..79373c4 100644
--- a/atompub_base.inc
+++ b/atompub_base.inc
@@ -81,7 +81,7 @@ class AtompubMethodNotAllowed extends AtompubException {
 
 class AtompubUnsupportedMediaType extends AtompubException {
   public function __construct($message = NULL) {
-    parent::__construct(415, 'Unsupported Media Type', $message);
+    parent::__construct(415, 'Unsupported Media Type: ' . $message);
   }
 }
 
diff --git a/atompub_collection.inc b/atompub_collection.inc
index af73be2..d5eb983 100644
--- a/atompub_collection.inc
+++ b/atompub_collection.inc
@@ -73,8 +73,8 @@ class AtompubCollection extends AtompubBase implements GET, POST {
   }
 
   public function post($type, $content) {
-    if (isset($type) && $type != 'application/atom+xml;type=entry') {
-      throw new AtompubUnsupportedMediaType();
+    if (isset($type) && $type != 'application/atom+xml;type=entry' && $type != 'application/atom+xml') {
+      throw new AtompubUnsupportedMediaType($type);
     }
 
     $document = AtompubDocument::createFromXml($content);
