views:

458

answers:

1

I'm furiously trying to debug why iTunes isn't accepting the data I'm sending to it (as a DAAP Server) - you can see what I'm trying to do on the github page.

The only difference I can find between my response and an identical response from mt-daapd (which iTunes does accept) is that the mt-daapd response is broken down into small packets, rather than one big one (I'm using Wireshark to packet sniff)

Does anyone know how to tell Sinatra (on Thin) to do this? Or have any idea why iTunes is so picky as to the responses it expects from DAAP Servers :P

A: 

You can use async.callback for streaming or return an object as body that responds to each and sending chunks via the block given to each. Also, if you are using Thin, you are running inside an EventMachine event loop, which is very helpful with such things.

Konstantin Haase
Thanks! I'll see if that helps, it certainly answers my question
JP