Results 1 to 5 of 5

Thread: (Solved) QNetworkAccessManager and http-stream without headers

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2012
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QNetworkAccessManager and http-stream without headers

    Hi Chris,

    Quote Originally Posted by ChrisW67 View Post
    An HTTP request was made and a non-HTTP response was received. This is a misconfigured HTTP server or not an HTTP server at all.

    If you run your wget with the "-S" option do you see any headers? What is the URL?
    The stream comes from a measuring system (running linux), which is inside it's own subnet without access to the internet. Data rate approx. 30MB/s. I have only limited access to the system. But your suggestion may be right, that there is no http server at all, and the system spits out only data at that particular port. Here is what wget -S said, translated from german :-):

    Qt Code:
    1. wget -S http://192.168.1.100:5432
    2. --2012-05-02 09:35:05-- http://192.168.1.100:5432/
    3. Trying to connect to 192.168.1.100:5432... connected.
    4. HTTP-Request sent, waiting for reply...
    5. Length: not specified
    6. Saving to »index.html«
    To copy to clipboard, switch view to plain text mode 

    What could I do to convince QNAM to read that stream without headers? If that cannot be achieved, what do you suggest to read those kind of streams?

    Cheers,
    Kai

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QNetworkAccessManager and http-stream without headers

    QTcpSocket is how you would connect to an arbitrary TCP endpoint and just receive data as it is sent.

  3. The following user says thank you to ChrisW67 for this useful post:

    muehle.kai (2nd May 2012)

  4. #3
    Join Date
    May 2012
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QNetworkAccessManager and http-stream without headers

    Hello Chris,

    Quote Originally Posted by ChrisW67 View Post
    QTcpSocket is how you would connect to an arbitrary TCP endpoint and just receive data as it is sent.
    that's it. I additionally implemented a QTcpSocket and did some minor changes on the sources. Now I can read via QNetworkAccessManager (already saved of data) or directly from the stream via QTcpSocket. Thank you for the suggestion!

    Cheers,
    Kai

Similar Threads

  1. Create QNetworkRequest from QString(http headers)
    By davidpmp in forum Qt Programming
    Replies: 1
    Last Post: 9th December 2011, 22:45
  2. QNetworkAccessManager and http redirection
    By grayfox in forum Qt Programming
    Replies: 5
    Last Post: 8th July 2011, 17:24
  3. HTTP Post from QNetworkAccessManager - no data sent
    By secureboot in forum Qt Programming
    Replies: 1
    Last Post: 13th April 2011, 18:46
  4. QNetworkAccessManager Http Basic Authentication?
    By jloundy in forum Qt Programming
    Replies: 5
    Last Post: 29th December 2010, 00:19
  5. get network stream with QNetworkAccessManager
    By Remco in forum Qt Programming
    Replies: 0
    Last Post: 26th August 2010, 16:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.