aboutsummaryrefslogtreecommitdiff
path: root/src/examples/mhd2spdy_http.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/mhd2spdy_http.c')
-rw-r--r--src/examples/mhd2spdy_http.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/examples/mhd2spdy_http.c b/src/examples/mhd2spdy_http.c
index 063b6d58..bb951e8d 100644
--- a/src/examples/mhd2spdy_http.c
+++ b/src/examples/mhd2spdy_http.c
@@ -190,6 +190,8 @@ http_cb_request (void *cls,
190 190
191 if(NULL == (proxy = au_malloc(sizeof(struct Proxy)))) 191 if(NULL == (proxy = au_malloc(sizeof(struct Proxy))))
192 { 192 {
193 free(http_uri->uri);
194 free(http_uri);
193 PRINT_INFO("No memory"); 195 PRINT_INFO("No memory");
194 return MHD_NO; 196 return MHD_NO;
195 } 197 }
@@ -391,19 +393,23 @@ http_cb_request_completed (void *cls,
391 if(MHD_REQUEST_TERMINATED_COMPLETED_OK != toe) 393 if(MHD_REQUEST_TERMINATED_COMPLETED_OK != toe)
392 { 394 {
393 proxy->http_error = true; 395 proxy->http_error = true;
394 if(proxy->stream_id > 0 && NULL != proxy->spdy_connection->session) 396 if(proxy->stream_id > 0 /*&& NULL != proxy->spdy_connection->session*/)
395 { 397 {
396 //send RST_STREAM_STATUS_CANCEL 398 //send RST_STREAM_STATUS_CANCEL
397 PRINT_INFO2("send rst_stream %i",proxy->spdy_active ); 399 PRINT_INFO2("send rst_stream %i",proxy->spdy_active );
398 spdylay_submit_rst_stream(proxy->spdy_connection->session, proxy->stream_id, 5); 400 spdylay_submit_rst_stream(proxy->spdy_connection->session, proxy->stream_id, 5);
399 } 401 }
402 /*else
403 {
404 DLL_remove(proxy->spdy_connection->proxies_head, proxy->spdy_connection->proxies_tail, proxy);
405 free_proxy(proxy);
406 }*/
400 } 407 }
401 } 408 }
402 else 409 else
403 { 410 {
404 PRINT_INFO2("proxy free http id %i ", proxy->id); 411 PRINT_INFO2("proxy free http id %i ", proxy->id);
405 //DLL_remove(proxy->spdy_connection->proxies_head, proxy->spdy_connection->proxies_tail, proxy); 412 free_proxy(proxy);
406 //free_proxy(proxy);
407 } 413 }
408 414
409 --glob_opt.responses_pending; 415 --glob_opt.responses_pending;