{"record":{"id":"2f549de173359b12","repo":"AlexxIT/go2rtc","slug":"unsupported-qop-auth","errorCode":null,"errorMessage":"unsupported qop: ${auth}","messagePattern":"unsupported qop: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/tcp/request.go","lineNumber":123,"sourceCode":"\t\tvar header string\n\n\t\tswitch qop {\n\t\tcase \"\":\n\t\t\tresponse := HexMD5(ha1, nonce, ha2)\n\t\t\theader = fmt.Sprintf(\n\t\t\t\t`Digest username=\"%s\", realm=\"%s\", nonce=\"%s\", uri=\"%s\", response=\"%s\"`,\n\t\t\t\tusername, realm, nonce, uri, response,\n\t\t\t)\n\t\tcase \"auth\":\n\t\t\tnc := \"00000001\"\n\t\t\tcnonce := core.RandString(32, 64)\n\t\t\tresponse := HexMD5(ha1, nonce, nc, cnonce, qop, ha2)\n\t\t\theader = fmt.Sprintf(\n\t\t\t\t`Digest username=\"%s\", realm=\"%s\", nonce=\"%s\", uri=\"%s\", qop=%s, nc=%s, cnonce=\"%s\", response=\"%s\"`,\n\t\t\t\tusername, realm, nonce, uri, qop, nc, cnonce, response,\n\t\t\t)\n\t\tdefault:\n\t\t\treturn nil, errors.New(\"unsupported qop: \" + auth)\n\t\t}\n\n\t\treq.Header.Set(\"Authorization\", header)\n\n\t\tif res, err = client.Do(req); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn res, nil\n}\n\nvar client *http.Client\n\ntype key string\n\nvar connKey = key(\"conn\")\nvar secureKey = key(\"secure\")","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/pkg/tcp/request.go#L105-L141","documentation":"tcp.Do Digest qop guard: the server's Digest challenge specifies a qop value that is neither empty nor 'auth' (e.g. 'auth-int'). The client only implements RFC 2617 qop='' and qop='auth', so it cannot construct a valid response header and the request fails.","triggerScenarios":"Thrown at pkg/tcp/request.go:123 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reconfigure the device/auth server to use qop=auth or no qop","Patch the client to implement auth-int if the server cannot change","Route through an auth proxy that downgrades the challenge"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c245815e75e2a5fd60b4290f12bfc04e55a984d3","analyzedAt":"2026-09-07T11:47:02.965Z","contentChangedAt":"2026-09-07T11:47:02.965Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}