views:

17

answers:

1

Hi!

I'm currently developing my own little http server for video streaming, and i can't for the life of me figure out how this actually works...

This is the request i get from the client:

"GET / HTTP/1.1 Host: 127.0.0.1:8080 Accept: / User-Agent: QuickTime.7.6.6 (qtver=7.6.6;cpu=IA32;os=Mac 10.6.4) Connection: close

"

To which my http server responds(actual code):

response << "HTTP / 1.1 200 OK" << "\r\n" << "Accept-Ranges: bytes" << "\r\n" << "Connection: close" << "\r\n" << "Content-Type: video/x-msvideo" << "\r\n" << "\r\n";

followed by the actual video as a bytearray.

The video doesnt play... What am I doing wrong?

A: 

Two debugging suggestions:

Telnet directly to your webserver (e.g. telnet 127.0.0.1 8080) and type in the get request manually. Verify that the response you receive back are like you expect. This might cause your terminal settings/display in the window you run telnet to be messed up, but it is a very quick and simple test.

You can also capture the traffic with wireshark.

hlovdal
Thanks! That really helped alot! :D
Robin Heggelund Hansen