| 2962 | } |
| 2963 | |
| 2964 | int |
| 2965 | HttpSM::tunnel_handler_100_continue(int event, void *data) |
| 2966 | { |
| 2967 | STATE_ENTER(&HttpSM::tunnel_handler_100_continue, event); |
| 2968 | |
| 2969 | ink_assert(event == HTTP_TUNNEL_EVENT_DONE); |
| 2970 | ink_assert(data == &tunnel); |
| 2971 | |
| 2972 | // We're done sending the 100 continue. If we succeeded, |
| 2973 | // we set up to parse the next server response. If we |
| 2974 | // failed, shutdown the state machine |
| 2975 | HttpTunnelConsumer *c = tunnel.get_consumer(_ua.get_txn()); |
| 2976 | |
| 2977 | if (c->write_success) { |
| 2978 | // Note: we must use destroy() here since clear() |
| 2979 | // does not free the memory from the header |
| 2980 | t_state.hdr_info.client_response.destroy(); |
| 2981 | tunnel.deallocate_buffers(); |
| 2982 | tunnel.reset(); |
| 2983 | |
| 2984 | if (server_entry->eos) { |
| 2985 | // if the server closed while sending the |
| 2986 | // 100 continue header, handle it here so we |
| 2987 | // don't assert later |
| 2988 | SMDbg(dbg_ctl_http, "server already closed, terminating connection"); |
| 2989 | |
| 2990 | // Since 100 isn't a final (loggable) response header |
| 2991 | // kill the 100 continue header and create an empty one |
| 2992 | t_state.hdr_info.server_response.destroy(); |
| 2993 | t_state.hdr_info.server_response.create(HTTP_TYPE_RESPONSE); |
| 2994 | handle_server_setup_error(VC_EVENT_EOS, server_entry->read_vio); |
| 2995 | } else { |
| 2996 | do_setup_client_request_body_tunnel(HTTP_SERVER_VC); |
| 2997 | } |
| 2998 | } else { |
| 2999 | terminate_sm = true; |
| 3000 | } |
| 3001 | |
| 3002 | return 0; |
| 3003 | } |
| 3004 | |
| 3005 | int |
| 3006 | HttpSM::tunnel_handler_push(int event, void *data) |
nothing calls this directly
no test coverage detected