Messer
Sep 12 2003, 17:25
I'm currently trying to play with some idea for a plugin, and it needs to retrieve data via http protocol (GET method). Can I use existing http_reader to perform this operation?
If the answer is yes, then how can I do that? How to check if http reader is installed and (generally) how to use readers?
TIA for any help.
reader * p_reader = file::g_open("http://blah.com/meh.php",reader::MODE_READ);
if (p_reader)
{
p_reader->read(blah,meh);
p_reader->reader_release();
}
Messer
Sep 12 2003, 18:07
Ah, thanks! That's easier than I thougt
Messer
Sep 13 2003, 20:03
Is there any way to modify headers sent by http_reader?
freedb servers i tried seem to assume "Connection: Keep-alive", and retrieving data from them takes ages (~15 seconds). I modified http_reader code to see what happens if "Connection: close" header is sent, and all GETs became blazing fast. It would be nice to find some workaround with unmodified http_reader...
Messer
Sep 18 2003, 16:47
OK, I circumvented this problem by implementing my own reader based on original foo_http_read, but I just wanted you to know that the same problem applies to remote *.pls reading (foobar unnecessarily stalls for ~15 seconds when you drop any url from, let's say, shoutcast.com).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.