You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by Ugo Cei <ug...@gmail.com> on 2007/09/05 11:50:05 UTC

Service document does not output ?

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

-- 
Ugo Cei
Sourcesense - making sense of Open Source: http://www.sourcesense.com




Re: Service document does not output ?

Posted by James M Snell <ja...@gmail.com>.
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
>