urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.61k stars 450 forks source link

fix(core): Handle both variations of multipart/mixed preamble #3172

Closed kitten closed 1 year ago

kitten commented 1 year ago

Summary

This implements a fix for a regression in #3155.

Basically, we now split the incoming multipart/mixed response by CRLF and the boundary. However, our tests send the preamble split by CRLF + boundary, while some newer variations would only send the boundary as the preamble and only after use CRLF

This caused the first payload to be malformed and disregarded.

Set of changes

maraisr commented 1 year ago

You could just pull in meros and get this kind of stuff for free

kitten commented 1 year ago

@maraisr We can't really any longer 😄 At least looking at it from what we did in the last major, the implementation now also throws out some smaller things we don't need and is combined with event streams, so I'm fine with fixing a regression from the refactor at the benefit of the combined implementation 👀