Re: WebSockets behind a proxy
Posted by
Phil B on
Jun 17, 2016; 10:33am
URL: https://forum.world.st/WebSockets-behind-a-proxy-tp4897393p4901370.html
Janko,
On Fri, 2016-06-17 at 12:18 +0200, Janko Mivšek wrote:
> Hi Phil,
>
> Unfortunately no docs for Swazoo, on the website there was just one
> example.
OK, good to know.
>
> I'm looking at the HTTPRequest>>readBodyFrom: and 8 byte read is only
> if
> contentLength header is missing in update request. Is that so with
> request from proxy? In this case it was expected that body of
> upgrade
> request is exactly 8 bytes long, which was a case when I worked on
> that.
> Is now different? How did you solve the problem, can you post a code?
>
Literally all I did was get rid of that logic so the method now reads:
readBodyFrom: aStream
(self headers includesFieldOfClass: HTTPContentLengthField)
ifFalse: [ ^ nil ].
self body: (aStream nextBytes: self contentLength).
Since it wasn't being used it seemed like just ignoring the body, if it
is present for upgrade requests, is safe to do and I haven't seen any
problems as a result of this change.
Thanks,
Phil
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida