eventStream multipart content-type header?
Hi folks,
am i missing a content-type=multipart when I request a &format=multipart eventStream from SSpy?
this is SSpy 5.2.6 running on a stalward 2012 Mini
I don't see it when I curl to a shell.
This came up noodling around w/node-red's multipart-stream-decoder node.
Comments
-
If you are specifying format=multipart when requesting the event stream, but you are not receiving a multipart stream, then the reason is probably that you are using a rather old version of SecuritySpy - updating to the latest version of SecuritySpy should solve this.
Have I understood the problem correctly? If not, please explain the problem you are seeing in more detail.
-
the format=multipart is working. I'm using a pretty recent/current version.
a library I am using for digesting the multipart response is complaining about a missing header and only processing the first element. I've forked the library and am planning on cutting out the header check.
from ... https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html
I believe the following is missing in the response:
Thus, a typical multipart Content-Type header field might look like this:
Content-Type: multipart/mixed; boundary=gc0p4Jq0M2Yt08jU534c0pbut the '--' prefix is fine as you're providing
does this make sense?
-
I've tested this and here is SecuritySpy's HTTP response to the request "eventStream?format=multipart":
HTTP/1.1 200 OK Server: BBVS/5.0/UUID-XXXX-XXXX Cache-Control: max-age=0, must-revalidate Pragma: no-cache SS-UUID: UUID-XXXX-XXXX Keep-Alive: timeout=20, max=100 Connection: Keep-Alive Content-Type: multipart/mixed; boundary=eventStreamBoundary
So as you can see, SecuritySpy does correctly include the Content-Type header.
-
hmm! thanks, I must not be dumping all of the request. I'm probably not curling correctly.
I'll take another trawl through the library to see what it's doing
