Publishing to vines returns "bad-request"

25 views
Skip to first unread message

Christoph Burgmer

unread,
Feb 1, 2013, 11:43:27 AM2/1/13
to xmpp-b...@googlegroups.com
Hi,

we are playing around with blather and vines to get a pubsub thing going. After putting in quite some time to get an initial example going we got confronted with the following error:

Code:
  pubsub.publish("some_node", {yay: nil}, "pubsub.localhost") 

Error:
<iq from="pubsub.localhost" id="blather000b" type="error">
  <error type="modify">
    <bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
  </error>

When comparing the specification under http://xmpp.org/extensions/xep-0060.html#publisher-publish and the output of blather, we noticed a missing <entry> tag. This has already been brought up before here: https://groups.google.com/forum/#!msg/xmpp-blather/EtyvZBhiY0k/gX8xRGWR3UkJ. In response to this bug https://github.com/adhearsion/blather/issues/28 was filed and solved afterwards.

Adding the following code solved the issue:

  e = Blather::XMPPNode.new('entry')
  e.content = "hello"
  e.namespace = 'http://www.w3.org/2005/Atom'
  pubsub.publish("some_node", {yay: el}, "pubsub.localhost") 

Our question now is: Why is blather not sending this <entry> tag, or more specifically why has this been removed from the code base.

Aurora & Christoph pairing

Ben Langfeld

unread,
Feb 1, 2013, 1:53:12 PM2/1/13
to xmpp-b...@googlegroups.com
You say removed: please point me to the commit that removed this. If it was never there in the first place, it's almost certainly an omission. Pull requests welcome.

Regards,
Ben Langfeld


--
You received this message because you are subscribed to the Google Groups "Blather" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpp-blather...@googlegroups.com.
To post to this group, send email to xmpp-b...@googlegroups.com.
Visit this group at http://groups.google.com/group/xmpp-blather?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Christoph Burgmer

unread,
Feb 1, 2013, 2:51:09 PM2/1/13
to xmpp-b...@googlegroups.com, b...@langfeld.me
Commit f70153fd6c9a8526 changed the behaviour introduced to fix said bug. (Btw. git log -Sentry lib/blather/stanza/pubsub.rb finds all commits connected to that)

I don't know the standard. With the changing of the behaviour I can only assume that some servers expect an entry node from the atom namespace, while some don't.

-Christoph

Ben Langfeld

unread,
Feb 1, 2013, 3:20:06 PM2/1/13
to xmpp-b...@googlegroups.com
The commit you reference made it possible to use payloads other than Atom. Unfortunately, it did not ensure that the DSL uses Atom payloads by default.

and here:

The low level API for using Atom is this: 

Blather::Stanza::PubSub::Items::PubSubItem.new 'foo', Blather::Stanza::AtomEntry.new('bar')

I would appreciate a pull request that uses this AtomEntry wrapper by default when using the DSL/Publish. Is that something you think you can do?

Regards,
Ben Langfeld
Reply all
Reply to author
Forward
0 new messages