[squeak-dev] The Inbox: WebClient-Core-tobe.120.mcz

Tobias Pape Das.Linux at gmx.de
Thu May 7 18:41:18 UTC 2020


Hi
> On 07.05.2020, at 20:24, Beckmann, Tom <Tom.Beckmann at student.hpi.uni-potsdam.de> wrote:
> 
> Hey Tobi,
> 
> we do still call `self content`, even if we go into the redirect branch, leading to the described timeout behavior:
> 
> WebClient>>#sendRequest:contentBlock
> ...
> 
>        "Handle redirect if needed"
>        (self allowRedirect and:[response isRedirect]) ifTrue:[
>                "Eat up the content of the previous response"
>                response content.
>                repeatRedirect := self redirect: request from: response.
>        ].
> ...
> 
> I also felt like there should be a more general fix here. From what I read, if no content-length is given, the client should read data until the server closes the connection, however, the socket in SqueakSSL kept reporting that the socket was connected when I tried to fetch data from the GitHub API, until we timed out. This seemed like it would also constitute a correct (and also much simpler) fix, just that maybe we should make this list of codes where we do not need to read data even longer. Maybe I'm also missing another code path somewhere that should catch this case though.

Yeah, in the end it is a robuster thing. Maybe we should catch all 3xx here? they ought all have no content, right?

Best regards
	-Tobias



More information about the Squeak-dev mailing list