Hi team,

Thanks to Martin Torhage, I can reproduce "canceled request".

Just implement slow controller:

index('GET', [], Context) ->
    timer:sleep(3000),
    {ok, Context}.

When running "curl http://localhost:8001/public/index";, we press Ctrl + C 
to interrupt process at client side.

It built response completely even request was canceled at client-side

> {response,200,[
> {header,"Content-Language","en"},
> {header,"Set-Cookie","csrf_token=SRRQPPONMLLI; Version=1; Expires=Mon, 
> 27-Jan-2014 17:01:55 GMT; Max-Age=525600; Path=/"},
> {header,"Set-Cookie","_boss_session=f5fb29155ac748ab81e40e5a74fd08a8c5d5f6ba; 
> Version=1; Expires=Mon, 27-Jan-2014 17:01:55 GMT; Max-Age=525600; 
> Path=/"},{header,"Content-Type","text/html"}],
> [],
> {data,[<<"bla bla bla">>]}})

(
in boss_web_controller_handle_request, it calls
handle_request/3,
handle_result/6,
build)dynamic_response/4,
handle_response/4,
then simple_bridge_response_wrapper:build_response/0,
then mochiweb_response_bridge:build_response/2
Here I don't understand why it didn't call 
cowboy_response_bridge:build_response/2. I define cowboy in boss.config
)
then there are error messages from cowboy

> [error] Error in process <0.273.0> on node 'r2d2@localhost' with exit 
> value: 
> {{case_clause,closed},[{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,529}]}]}
> [error] Ranch listener boss_http_listener had connection process started 
> with cowboy_protocol:start_link/4 at <0.273.0> exit with reason: 
> {{case_clause,closed},[{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,529}]}]}

(
I don't know where CB uses cowboy, so I don't know to print debug 
)

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/0854b632-769f-4955-b615-186994368b97%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to