GNOME Bugzilla – Bug 150561
gnome-vfs missing custom meta data field support in the neon http method
Last modified: 2004-12-22 21:47:04 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?
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.
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.
With patch applied I appear to be getting the same error. Retesting to make sure ...
Same problem here with gnome-vfs 2.7.92, the patch doesn't fix the issue.
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!
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.