WebSocket message turns into weird characters at Mozilla Firefox - firefox

We're trying to send a message via WebSocket in Firefox but when message exceeds some length it turns into weird characters like:
��
Is there anyway to set this buffer length or way out of this except sending the message as parts?

It's really weird but, we needed to rehandshake before sending our message.
That solved our problem.

Related

What does "ERR_HTTP2_PING_FAILED" mean in Chrome error code?

That error message logged to the chrome console from a long-pending request after around 15 minutes.
It looks client-side error because server processing still worked.
I did not find any article related to this error message.
can any buddy let me know how to solve this issue?
According to the chromium source I think it means that a spdy ping timed out.
...
{net::ERR_EMPTY_RESPONSE, "http.response.empty"},
{net::ERR_HTTP2_PING_FAILED, "spdy.ping_failed"},
{net::ERR_HTTP2_PROTOCOL_ERROR, "spdy.protocol"},
...
Source https://chromium.googlesource.com/chromium/src/+/lkgr/components/domain_reliability/util.cc#48
Chrome sends such pings before and after a request.
Source https://groups.google.com/d/msg/spdy-dev/HFjAbFRd-N0/p-Edt-lneGsJ

Fixing 416 error: HTTParty

Getting a 416 error when trying to GET a website with HTTParty. Works just fine in the browser.
I have never gotten this error before, so I went online and found this:
It occurs when the server is unable to fulfill the request. This may
be, for example, because the client asked for the 800th-900th bytes of
a document, but the document is only 200 bytes long.
The request includes a Range request-header field, and not any of the
range-specifier values in this field overlaps the current extent of
the selected resource, and also the request does not include an
If-Range request-header field.
Wondering if anyone has gotten 416 with HTTParty before and if there is a way to prevent this form happening. Thanks
Example website where error occurs:
http://www.bizjournals.com/jacksonville/blog/morning-edition/2014/07/teens-make-up-less-of-summer-workforce-than-ever.html
It appears that bizjournals is able to detect you are a bot (not accessing in the browser) and therefore returns a 416.
irb(main):005:0> HTTParty.get('http://www.bizjournals.com/jacksonville/blog/morning-edition/2014/07/teens-make-up-less-of-summer-workforce-than-ever.html').body
=> "........As you were browsing <strong>http://www.bizjournals.com</strong> something about your browser made us think you were a bot. There are a few reasons this might happen........"
You could either ask bizjournals to allow you to make requests or try to change the headers to make bizjournals think you are not a bot.

WebSocket4Net issue with multiple frames

I have a WebSocket Server that I can hit from a browser and get valid messages that parse JSON correctly. These messages are large, about 9K, and when looking at Google Chome Developer Tools I can see that its coming in multiple frames.
Now, I've been trying to hit the same service from a console application using WebSocket4Net. The smaller messages come across fine, but my larger messages are getting messed up. Basically, at the point where the Chrome Developer Tools are showing me where the initial frame ends, I'm getting the start of the next actual message, not the continuation frame.
I'm seeing some funny characters when looking at the HEX, at the point of the message truncation...seeing (HEX) 80 7e 06 15 .... or something close, but it always begins with '80 7e'.
I've increased the ReceiveBufferSize to 12,000, but that doesn't seem to help.
Anybody else ever see this?
Thanks.
Finally I was able to get some help on the CodePlex site. If you are having any issues like I was, check this posting out (https://websocket4net.codeplex.com/workitem/35).
Have a great day!

Receiving message in AT commands not working

I am using sim 900a modem. I want to read the messages coming to this modem. I have enabled the text mode AT+CMGF=1; I am sending message:
http://www.hughes.com/AT_Command_Reference.html#AT_plusCMGF
but I am receiving in this format...
+CMT: "+919841675265","","14/06/14,12:04:14+22"
0068007400740070003A002F002F006D006100700073002E0067006F006F0067006C0065002E0068
+CMT: "+919841675265","","14/06/14,12:04:17+22"
00200020002000540069006D0065003A00310034003A00330033003A003400340020002000440067
If I send the same message from another phone, I am receiving correctly....
I cant find where the problem is... please help me on this.
Maybe is because of the codepage you are using.
With the AT command AT+CSCS try to set your codepage in IRA or GSM.
Example: AT+CSCS="IRA"

Does a response to an xmlhttprequest call have to be XML?

I've written a bunch of xhr stuff over the years, but today I ran into a curious thing. In firefox with firebug every time my server responds, I get a syntax error in the console. And the error context is the message response text.
The message response text is a string of numbers separated by pipes "|".
Sure it's not valid xml, but I've never sent valid xml before and never had a problem.
Is this a firebug thing or is firefox really unhappy about my response text?
No. It can be xml, json, or some other structure of your choosing.

Resources