Skip to content

fix: empty string in arrayBuffer - #447

Merged
ItMaga merged 2 commits into
v4from
itmaga/empty-array-buffer
Oct 30, 2024
Merged

fix: empty string in arrayBuffer#447
ItMaga merged 2 commits into
v4from
itmaga/empty-array-buffer

Conversation

@ItMaga

Copy link
Copy Markdown
Member

Описание проблемы

Когда приходит заголовок Content-Type: application/octet-stream, может в ответе прийти пустая строка. Например, так происходит при некоторых условиях, в нодовой библиотеке http-outgoing, и в этом случае у нас падает ошибка TypeError("Can't read response data as ArrayBuffer"). Как я понимаю, пустая строка с таким заголовком является валидным

@ItMaga
ItMaga requested review from kobezzza and shining-mind and removed request for kobezzza and shining-mindOctober 24, 2024 14:27
Comment threadsrc/core/request/response/index.ts
@ItMaga
ItMaga merged commit 887ea5e into v4Oct 30, 2024
@ItMaga
ItMaga deleted the itmaga/empty-array-buffer branch October 30, 2024 09:24
alexeishcherbina pushed a commit that referenced this pull request Dec 4, 2024
* fix: empty string in arrayBuffer
* chore: linter
gretzkiy added a commit that referenced this pull request Dec 9, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@ItMaga@kobezzza@shining-mind