Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(core): Fix multipart stream being split when content contains boundary (#3155)

authored by

Phil Pluckthun and committed by
GitHub
fe4e08a6 35657e77

+6 -1
+5
.changeset/nervous-forks-drum.md
··· 1 + --- 2 + '@urql/core': patch 3 + --- 4 + 5 + Fix boundary stopping `multipart/mixed` streams when it randomly occurs in response payloads.
+1 -1
packages/core/src/internal/fetchSource.ts
··· 77 77 response: Response 78 78 ): AsyncIterableIterator<ExecutionResult> { 79 79 const boundaryHeader = contentType.match(boundaryHeaderRe); 80 - const boundary = '--' + (boundaryHeader ? boundaryHeader[1] : '-'); 80 + const boundary = '\r\n--' + (boundaryHeader ? boundaryHeader[1] : '-'); 81 81 let isPreamble = true; 82 82 let payload: any; 83 83 for await (const chunk of split(streamBody(response), boundary)) {