yiisoft / yiisoft/data-response

Double formatting of the response body

Open
#83 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status:under discussion
Dominant language
PHP
Stars
19
Forks
13
Avg merge
1h 6m
Merged PRs (30d)
1

Description

Good day. Some DataResponse methods cause the response body to be formatted. This causes a marker to be placed about it. But also some immutable methods reset this marker, which leads to repeated formatting. This can lead to both additional processing of large amounts of data or to an error in case of using a "one way" iterator. I think it is necessary to make either an additional marker for the body or not format the body before directly outputting it. Thanks in advance

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the DataResponse methods involved in formatting the response body, especially the immutable methods that reset the formatting marker. Reproduce the issue with a large body and a one-way iterator, then verify that immutable operations do not cause repeated formatting or iterator errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.