Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1065 (closed defect: fixed)

Opened 4 months ago

Last modified 1 month ago

ChunkStream's ChunkOutput doesn't terminate properly

Reported by: Nietsnie Assigned to: kris
Priority: normal Milestone: 0.99.7
Component: IO Version: trunk
Keywords: Cc:

Description (Last modified by Nietsnie)

As per RFC:

"The chunk-size field is a string of hex digits indicating the size of the chunk. The chunked encoding is ended by any chunk whose size is zero, followed by the trailer, which is terminated by an empty line."

Currently, the ChunkOutput? does not do the 0 terminator as stated above.

How the current interface works, I'm not entirely sure how you would deal with this properly. Perhaps on the flush? Currently, I'm doing an output.flush followed by a .write("") and flush again, which puts a 0 terminator at the end.

Change History

04/23/08 12:45:35 changed by Nietsnie

  • description changed.

04/23/08 12:50:40 changed by larsivi

  • milestone set to 0.99.7.

05/26/08 00:38:48 changed by kris

Yeah, that's tricky. I added header support in the meantime, but don't see a clean way to support this in an invisible fashion

05/26/08 00:50:10 changed by kris

  • status changed from new to assigned.
  • milestone changed from 0.99.7 to 1.0.

added a terminate() function for now ...

07/18/08 13:13:35 changed by Nietsnie

Terminate is working well for me. I think it makes sense and doesn't feel awkward.

07/19/08 12:42:50 changed by kris

  • status changed from assigned to closed.
  • resolution set to fixed.

ok, thanks

07/19/08 16:38:15 changed by larsivi

  • milestone changed from 1.0 to 0.99.7.