{"record":{"id":"2b6966e6e25b0f85","repo":"XTLS/Xray-core","slug":"too-big-http-1xx-response","errorCode":null,"errorMessage":"too big http 1xx response","messagePattern":"too big http 1xx response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"proxy/http/server.go","lineNumber":339,"sourceCode":"\tif err == nil || err == bufio.ErrBufferFull {\n\t\tstr := string(peekBytes)\n\t\tResponseLine := strings.Split(str, \"\\r\\n\")[0]\n\t\t_, status, _ := strings.Cut(ResponseLine, \" \")\n\t\t// only handle 1xx response\n\t\tif strings.HasPrefix(status, \"1\") {\n\t\t\tResponseHeader1xx := []byte{}\n\t\t\t// read until \\r\\n\\r\\n (end of http response header)\n\t\t\tfor {\n\t\t\t\tdata, err := r.ReadSlice('\\n')\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, errors.New(\"failed to read http 1xx response\").Base(err)\n\t\t\t\t}\n\t\t\t\tResponseHeader1xx = append(ResponseHeader1xx, data...)\n\t\t\t\tif bytes.Equal(ResponseHeader1xx[len(ResponseHeader1xx)-4:], []byte{'\\r', '\\n', '\\r', '\\n'}) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tif len(ResponseHeader1xx) > 1024 {\n\t\t\t\t\treturn nil, errors.New(\"too big http 1xx response\")\n\t\t\t\t}\n\t\t\t}\n\t\t\twriter.Write(ResponseHeader1xx)\n\t\t}\n\t}\n\treturn http.ReadResponse(r, req)\n}\n\nfunc init() {\n\tcommon.Must(common.RegisterConfig((*ServerConfig)(nil), func(ctx context.Context, config interface{}) (interface{}, error) {\n\t\treturn NewServer(ctx, config.(*ServerConfig))\n\t}))\n}\n","sourceCodeStart":321,"sourceCodeEnd":353,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/proxy/http/server.go#L321-L353","documentation":"Error \"too big http 1xx response\" thrown in XTLS/Xray-core.","triggerScenarios":"Thrown at proxy/http/server.go:339 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}