After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 150561 - gnome-vfs missing custom meta data field support in the neon http method
gnome-vfs missing custom meta data field support in the neon http method
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Module: http
cvs (head)
Other Linux
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2004-08-19 15:10 UTC by jlaska
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Proposed patch (4.66 KB, patch)
2004-08-28 23:29 UTC, Christian Kellner
none Details | Review
Patch I commited to cvs HEAD. (7.46 KB, patch)
2004-10-06 10:56 UTC, Christian Kellner
none Details | Review

Description jlaska 2004-08-19 15:10:28 UTC
# Relavant package versions:
#   gnome-vfs2-2.7.90-3
#   rhythmbox-0.8.5-1
#   gstreamer-0.8.5-1

In discussion with Alex Larsson it was discovered that meta data field support
was not present in gnome-vfs2 (gnome2.7).  I discovered the issue when all of
the sudden my favorite streaming media server would fail to play in rhythmbox. 
Rhythmbox presents the following dialog (with host changed of course):

'Could not open vfs file "http://1.2.3.4:8000/" for reading.'

Followed by another dialog:

'Could not pause playback'

Oddly enough, other streaming media servers continue to play without error. 
After examining the headers returned by the server I see that the above server
(1.2.3.4) is returning additional icecast headers that the other streaming
servers are not.

$ telnet 1.2.3.4 8000
Trying 69.132.105.190...^M
Connected to cpe-1-2-3-4.carolina.rr.com (1.2.3.4).^M
Escape character is '^]'.^M 
GET /

 ICY 200 OK
 icy-notice1:<BR>This stream requires <a
href="http://www.winamp.com/">Winamp</a><BR>
 icy-notice2:SHOUTcast Distributed Network Audio Server/win32 v1.9.2<BR>
 icy-name:HOOKED ON SONICS || Pavement | Spoon | Modest Mouse | et al
 icy-genre:Alternative
 icy-url:http://www.somehost.info/playlist.htm
 Content-Type:audio/mpeg
 icy-pub:1
 icy-br:48

While on streaming servers that still play I get the following headers:

 icy-notice1:<BR>This stream requires <a
href="http://www.winamp.com/">Winamp</a><BR>
 icy-notice2:SHOUTcast Distributed Network Audio Server/Linux v1.9.2<BR>
 icy-name:WAMC Live Stream
 icy-genre:
 icy-url:http://www.wamc.org/
 Content-Type:audio/mpeg
 icy-pub:0
 icy-br:56


Alex then suggested, after examining the following code snippet, that perhaps
the reason for the failure is because there is no support for
GNOME_VFS_MODULE_CALLBACK_HTTP_RECEIVED_HEADERS and
GNOME_VFS_MODULE_CALLBACK_HTTP_SEND_ADDITIONAL_HEADERS in the neon http method.

<alex> #if 0
<alex>    working around that is a bigger thing */
<alex> typedef struct {
<alex>  
<alex>  GnomeVFSURI *uri;
<alex>  gboolean sent;
<alex>  
<alex> } AddHeadersContext;
<alex> static void 
<alex> neon_handle_additional_headers (ne_request *req, 
<alex>     void *userdata, 
<alex> eh, the comment wast
<alex>  /* Does not work because the neon library doesnt provide as all the headers
<alex>    working around that is a bigger thing */

<alex> however, there is no comment about
GNOME_VFS_MODULE_CALLBACK_HTTP_RECEIVED_HEADERS,
<alex> Can you file a bug against upstream gnome-vfs
<alex> Explaining your problem, and that you need support for
GNOME_VFS_MODULE_CALLBACK_HTTP_RECEIVED_HEADERS and
GNOME_VFS_MODULE_CALLBACK_HTTP_SEND_ADDITIONAL_HEADERS in the neon http method


Thoughts?  Is there additional information I can provide in the bug report that
will assist in debugging?
Comment 1 Christian Kellner 2004-08-20 06:45:02 UTC
Yep. I wanna have that fixed too soon. Sending additional headers is not the
problem but returning the recived headeres back is the problem because the neon
library doesn't have the right functions for getting all "Header: Value"
strings. We only get the value in callbacks and must re-create the header itself
.. I'll try to provide a patch for that soon. 
Comment 2 Christian Kellner 2004-08-28 23:29:52 UTC
Created attachment 31054 [details] [review]
Proposed patch

Ok I was wrong with the above statement but that was very because it turned out
that it wasn't that much work. So here is the patch for both sending additional
headers and the received headers callback. Could you please test it? Thanks.
Comment 3 jlaska 2004-08-30 12:59:11 UTC
With patch applied I appear to be getting the same error.  Retesting to make
sure ...
Comment 4 Sebastien Bacher 2004-09-04 19:46:06 UTC
Same problem here with gnome-vfs 2.7.92, the patch doesn't fix the issue.
Comment 5 Christian Kellner 2004-09-04 21:03:00 UTC
I think I solved the issue. Please have a look at
http://bugzilla.gnome.org/show_bug.cgi?id=151453.
Ill keep this bug open for the headers stuff, though!
Comment 6 Christian Kellner 2004-10-06 10:56:15 UTC
Created attachment 32280 [details] [review]
Patch I commited to cvs HEAD.

I commited a modified version of the last patch to cvs head. I tested it here
but I would be happy if some more people could give head a try and report
errors.