PDA

View Full Version : QHttpRequestHeader shoutcast



skyline2000skyline
8th November 2008, 00:16
Hello I'm trying to implement one of the examples here with QT

http://www.codeproject.com/KB/audio-video/SHOUTcastRipper.aspx
http://www.codeproject.com/KB/audio-video/shoutcaststream.aspx

to readout the meta info of a shoutcast stream but

SIGNAL(requestFinished................. gives me back

"Invalid HTTP response header"

here is the code I'm using what's wrong/missing here?


QHttpRequestHeader header( "GET", "/stream/2001 HTTP/1.0" );
header.setValue( "Host", "67.210.97.226" );
header.setValue( "Port","8000");
header.setValue( "Icy-MetaData", "1");
header.setValue( "User-Agent", "VLC media player" );

QUrl url("http://67.210.97.226");
url.setPort(8000);

http = new QHttp(this);
QHttp::ConnectionMode mode = QHttp::ConnectionModeHttp;
http->setHost(url.host(), mode, url.port());
http->request(header);

connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader&)), this, SLOT(readResponseHeader(const QHttpResponseHeader&)));

connect(http, SIGNAL(requestFinished(int, bool)),
this, SLOT(httpRequestFinished(int, bool)));