Skip to content

H2 sni.yaml overrides do not work with accept threads off #5720

Description

@zwoop

With accept threads off, i.e.

CONFIG proxy.config.accept_threads INT 0

There is no accept_obj at this point in the SNIAction handlers, so e..g this fails:

class DisableH2 : public ActionItem
{
public:
  DisableH2() {}
  ~DisableH2() override {}

  int
  SNIAction(Continuation *cont) const override
  {
    auto ssl_vc     = dynamic_cast<SSLNetVConnection *>(cont);
    auto accept_obj = ssl_vc ? ssl_vc->accept_object : nullptr;
    if (accept_obj && accept_obj->snpa && ssl_vc) {

This essentially makes it impossible to turn off H2 via sni.yaml, unless accept threads are enabled. I don't know if any other SNIAction() handlers would have similar issues.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions