WordPress.org

Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 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 12 years ago.
Return string only and fix bug with loop.
8618.wp27.diff (1.5 KB) - added by jacobsantos 12 years ago.
Patch for WordPress 2.7 Branch
8618.2.diff (1.2 KB) - added by jacobsantos 12 years ago.
Fix for the fix on trunk.

Download all attachments as: .zip

Change History (16)

@jacobsantos
12 years ago

Return string only and fix bug with loop.

#1 @jacobsantos
12 years ago

  • Keywords needs-testing added

#2 @jacobsantos
12 years ago

  • Version set to 2.7

#3 @jacobsantos
12 years ago

  • Component changed from General to HTTP
  • Owner anonymous deleted

#4 @jacobsantos
12 years ago

  • Owner set to jacobsantos

#5 @jacobsantos
12 years ago

This should be committed as soon as possible.

#6 @jacobsantos
12 years ago

It should fix several other issues people have having.

#7 @ryan
12 years ago

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

#8 follow-up: @ryan
12 years ago

Milestone for 2.7.1?

#9 @DD32
12 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..

#10 @jacobsantos
12 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.

#11 in reply to: ↑ 8 @jacobsantos
12 years ago

Replying to ryan:

Milestone for 2.7.1?

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

@jacobsantos
12 years ago

Patch for WordPress 2.7 Branch

@jacobsantos
12 years ago

Fix for the fix on trunk.

#12 @ryan
12 years ago

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

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

#13 @ryan
12 years ago

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

Note: See TracTickets for help on using tickets.