Closed Bug 1037877 Opened 11 years ago Closed 10 years ago

TCPSocket is not returning all data via ondata

Categories

(Firefox OS Graveyard :: Gaia, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: rlb, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.0 (Beta/Release) Build ID: 20140621231050 Steps to reproduce: Run an mpd server (http://www.musicpd.org) on some.host:6600, and then execute this code from a "tcp-socket" privileged app on either the simulator or a nexus-s running 1.4: function mpd_test() { var s = navigator.mozTCPSocket.open("some.host", 6600); s.onerror = console.log; s.onopen = function() { s.send("status"); }; s.ondata = function(data) { return console.log(data); }; return null; }; mpd_test(); Actual results: Something like this was seen on the console: Object { _type: "data", _target: Object, _data: "OK MPD 0.16.0 " } Expected results: Roughly 20 lines of status information should have been returned. The expected output can be seen by running "telnet some.host 6600", and then typing "status" and hitting return. I'm guessing that I must just be overlooking something obvious. I'd be a bit surprised if ondata was actually broken this way. Here's sample status output: $ telnet some.host 6600 Trying 192.1681.1.3... Connected to some.host. Escape character is '^]'. OK MPD 0.16.0 status volume: 51 repeat: 0 random: 0 single: 0 consume: 1 playlist: 101 playlistlength: 0 xfade: 0 mixrampdb: 0.000000 mixrampdelay: nan state: stop OK Thanks
That should be s.send("status\r\n");
Oh, of *course* (chagrined). Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.