void HttpSM::handle_http_server_open() The server connection is now open. If there is a POST or PUT, we need setup a transform is there is one otherwise we need to send the request header
| 6064 | // to send the request header |
| 6065 | // |
| 6066 | void |
| 6067 | HttpSM::handle_http_server_open() |
| 6068 | { |
| 6069 | // [bwyatt] applying per-transaction OS netVC options here |
| 6070 | // IFF they differ from the netVC's current options. |
| 6071 | // This should keep this from being redundant on a |
| 6072 | // server session's first transaction. |
| 6073 | if (nullptr != server_txn) { |
| 6074 | NetVConnection *vc = server_txn->get_netvc(); |
| 6075 | if (vc) { |
| 6076 | server_connection_provided_cert = vc->provided_cert(); |
| 6077 | if (vc->options.sockopt_flags != t_state.txn_conf->sock_option_flag_out || |
| 6078 | vc->options.packet_mark != t_state.txn_conf->sock_packet_mark_out || |
| 6079 | vc->options.packet_tos != t_state.txn_conf->sock_packet_tos_out || |
| 6080 | vc->options.packet_notsent_lowat != t_state.txn_conf->sock_packet_notsent_lowat) { |
| 6081 | vc->options.sockopt_flags = t_state.txn_conf->sock_option_flag_out; |
| 6082 | vc->options.packet_mark = t_state.txn_conf->sock_packet_mark_out; |
| 6083 | vc->options.packet_tos = t_state.txn_conf->sock_packet_tos_out; |
| 6084 | vc->options.packet_notsent_lowat = t_state.txn_conf->sock_packet_notsent_lowat; |
| 6085 | vc->apply_options(); |
| 6086 | } |
| 6087 | } |
| 6088 | server_txn->set_inactivity_timeout(get_server_inactivity_timeout()); |
| 6089 | |
| 6090 | int method = t_state.hdr_info.server_request.method_get_wksidx(); |
| 6091 | if (method != HTTP_WKSIDX_TRACE && |
| 6092 | server_txn->has_request_body(t_state.hdr_info.request_content_length, |
| 6093 | t_state.client_info.transfer_encoding == HttpTransact::CHUNKED_ENCODING) && |
| 6094 | do_post_transform_open()) { |
| 6095 | do_setup_client_request_body_tunnel( |
| 6096 | HTTP_TRANSFORM_VC); /* This doesn't seem quite right. Should be sending the request header */ |
| 6097 | } else { |
| 6098 | setup_server_send_request_api(); |
| 6099 | } |
| 6100 | } else { |
| 6101 | ink_release_assert(!"No server_txn"); |
| 6102 | } |
| 6103 | } |
| 6104 | |
| 6105 | // void HttpSM::handle_server_setup_error(int event, void* data) |
| 6106 | // |
nothing calls this directly
no test coverage detected