<s> import coro <EOL> import coro . http <EOL> import coro . backdoor <EOL> import sys <EOL> W = sys . stderr . write <EOL> def session ( sid , fifo ) : <EOL> i = <NUM_LIT:0> <EOL> while <NUM_LIT:1> : <EOL> try : <EOL> request = coro . with_timeout ( <NUM_LIT> , fifo . pop ) <EOL> except coro . TimeoutError : <EOL> break <EOL> else : <EOL> request [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> if i == <NUM_LIT:10> : <EOL> request . push ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> ) <EOL> request . done ( ) <EOL> break <EOL> else : <EOL> request . push ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' % ( i , ) <EOL> ) <EOL> request . done ( ) <EOL> i += <NUM_LIT:1> <EOL> server = coro . http . server ( ) <EOL> server . push_handler ( coro . http . handlers . coro_status_handler ( ) ) <EOL> server . push_handler ( coro . http . session_handler . session_handler ( '<STR_LIT>' , session ) ) <EOL> server . push_handler ( coro . http . handlers . favicon_handler ( ) ) <EOL> coro . spawn ( server . start , ( '<STR_LIT>' , <NUM_LIT> ) ) <EOL> coro . spawn ( coro . backdoor . serve , unix_path = '<STR_LIT>' ) <EOL> coro . event_loop ( <NUM_LIT> ) </s>
