Re: Quick question regarding recent SOUP_ENCODING_EOF code



[...]

>> I do use soup_server_unpause_message () in my write_next_chunk ()
callback.
>
> The only time you need to call unpause_message (assuming you didn't
pause the message yourself) is if you let the message body "underflow"

[...]

The data read by g_input_stream_read () is coming from a GStreamer
pipeline, so there may be an underflow. This is why I tried to use
unpause().

>> The following works fine when using chunked encoding (writes
>> "wrote 0 bytes, sending message complete" once and stops getting
called) but not when using EOF encoding (called over and over, printing
"wrote 0 bytes, sending message complete" repeatedly)
>
> Bizarre. Is your code available in svn or git or something somewhere
that I can see it/try it?

I think I figured this out. I was sending a Content-Length in the header,
despite using EOF/chunked encoding. I did this in order to support a
broken client. I used the generic soup_message_headers_append() function,
so I had thought it would sneak by libsoup. Would it be appropriate to
have libsoup ignore this header when in EOF encoding mode?

The code is a part of libdmapsharing, available at (see
libdmapsharing/daap-share.c:462):

http://libdmapsharing.svn.sourceforge.net/viewvc/libdmapsharing/trunk/libdmapsharing/

The application, dmapd, which uses libdmapsharing, is available at
http://www.flyn.org/projects/dmapd/

Mike





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]