WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8618 closed defect (bug) (fixed)

Chunked Decode not completely working

Reported by: jacobsantos Owned by: jacobsantos
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.7
Component: HTTP API Keywords: has-patch needs-testing
Focuses: Cc:

Description

Fixes several issues and ensures that a string is always returned.

Attachments (3)

8618.diff (7.7 KB) - added by jacobsantos 7 years ago.
Return string only and fix bug with loop.
8618.wp27.diff (1.5 KB) - added by jacobsantos 7 years ago.
Patch for WordPress 2.7 Branch
8618.2.diff (1.2 KB) - added by jacobsantos 7 years ago.
Fix for the fix on trunk.

Download all attachments as: .zip

Change History (16)

@jacobsantos7 years ago

Return string only and fix bug with loop.

comment:1 @jacobsantos7 years ago

  • Keywords needs-testing added

comment:2 @jacobsantos7 years ago

  • Version set to 2.7

comment:3 @jacobsantos7 years ago

  • Component changed from General to HTTP
  • Owner anonymous deleted

comment:4 @jacobsantos7 years ago

  • Owner set to jacobsantos

comment:5 @jacobsantos7 years ago

This should be committed as soon as possible.

comment:6 @jacobsantos7 years ago

It should fix several other issues people have having.

comment:7 @ryan7 years ago

(In [10282]) Chunked decode fixes. Don't return WP_Error for body. Props jacobsantos. see #8618

comment:8 follow-up: @ryan7 years ago

Milestone for 2.7.1?

comment:9 @DD327 years ago

re: } while ( true === $done );

why not just change that to while(true) and remove the $done and break, It'll probably only confuse someone in the future..

Well.. Actually, Wait a minute. That change results in the loop only running once, because $done will -never- be true in that loop, well.. it will be.. right before it exits the function.. So, If theres multiple chunks in the document (I swear thats possible, right?) it'll return null from that function now..

comment:10 @jacobsantos7 years ago

Multiple Chunks? WTF? No, I don't think that is in the spec. There can be footer headers after the '0', but that is it.

comment:11 in reply to: ↑ 8 @jacobsantos7 years ago

Replying to ryan:

Milestone for 2.7.1?

Yes, please. Leave the while as it is for it though.

@jacobsantos7 years ago

Patch for WordPress 2.7 Branch

@jacobsantos7 years ago

Fix for the fix on trunk.

comment:12 @ryan7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [10283]) Chunked decoding fix from jacobsantos. fixes #8618

comment:13 @ryan7 years ago

(In [10284]) Chunked decoding fix from jacobsantos. fixes #8618 for 2.7

Note: See TracTickets for help on using tickets.