Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Ticket #318 (defect)

Opened 3 years ago

Last modified 3 years ago

Yields should collapse by default

Status: closed (fixed)

Reported by: fumanchu Assigned to: fumanchu
Priority: normal Milestone: 2.1-rc2
Component: CherryPy code Keywords:
Cc:

Many users like to use "yield" in their page handlers, but aren't prepared for the side-effects of this choice when using HTTP/1.1. Even those developers who need the streaming functionality report that they need it infrequently. Rather than ask people to use "return", we should instead collapse generator-bodies by default. A config entry, "collapseYields" (True by default), should be introduced; setting it to False would enable streamed yields for that path. Therefore, in order to enable streaming yields, you'd have to have HTTP/1.1 on both the client and server sides AND set this value; I don't think that's too much to ask given how uncommon the need is.

My only remaining question is whether this could be sneaked into 2.1 or not...I'd like it to be.

Change History

09/23/05 16:23:19: Modified by fumanchu

  • milestone changed from 2.1-rc1 to 2.1-rc2.

09/23/05 17:11:48: Modified by fumanchu

  • owner changed from rdelon to fumanchu.

09/24/05 02:03:41: Modified by ionel

  • owner changed from fumanchu to anonymous.
  • status changed from new to assigned.

i'm one of the 'yield' lovers and i got some content that needs streaming but i'm thinking right now of caching that part. so it might be a good idea to have the feature as default

09/24/05 02:07:12: Modified by fumanchu

  • owner changed from anonymous to fumanchu.
  • status changed from assigned to new.

09/25/05 13:36:22: Modified by rdelon

I think this makes sense so I think that yes, we should do it (and include it in 2.1-final)

09/25/05 18:25:59: Modified by fumanchu

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

Fixed in [679]. Use the config entry "streamResponse" to enable streamed output for a given path.

Hosted by WebFaction

Log in as guest/cpguest to create tickets