Well, we can call it a bug but the code is actually working as intended. When you call addAcceptEntry, the code under the covers checks to see if entries are already accepted, since there are no <accept> elements in the collection yet, and since Atompub says that the lack of <accept> elements is equivalent to <accept>application/atom+xml;type=entry</accept>, calling addAcceptEntry first has no actual effect. If you call setAcceptEntry instead, things work the way you'd expect. This is obviously not ideal and should be fixed.
- James Ugo Cei wrote: > Please check revision r572928. It's a test that creates a service > document with a single collection which should accept entries and a > made-up media type, but the resulting service document does not include > any <accept> element. > > Since this is something very basic I am reluctant to open a Jira issue, > thinking that it's probably me that is doing something very wrong and > stupid. So I'd like a confirmation that this is indeed a bug. > > Ugo >
