Github user bgaff commented on a diff in the pull request: https://github.com/apache/trafficserver/pull/624#discussion_r62701032 --- Diff: proxy/InkAPI.cc --- @@ -4858,6 +4858,15 @@ TSHttpTxnInfoIntGet(TSHttpTxn txnp, TSHttpTxnInfoKey key, TSMgmtInt *value) return TS_SUCCESS; } +bool +TSHttpTxnIsWebsocket(TSHttpTxn txnp) +{ + sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); + + HttpSM *sm = (HttpSM *)txnp; + return sm->t_state.is_upgrade_request && sm->t_state.upgrade_token_wks == MIME_VALUE_WEBSOCKET; --- End diff -- You should probably instead do, as is_websocket was set if all the required websocket headers were sent, also there is a check for the upgrade succeeding. return sm->t_state.is_upgrade_request && sm->t_state.did_upgrade_succeed && sm->t_state.is_websocket
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---