{"record":{"id":"309868a1e323a419","repo":"XTLS/Xray-core","slug":"unsupported-padding-method","errorCode":null,"errorMessage":"unsupported padding method: ","messagePattern":"unsupported padding method: ","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/transport_method.go","lineNumber":359,"sourceCode":"\n\tif c.XPaddingHeader == \"\" {\n\t\tc.XPaddingHeader = \"X-Padding\"\n\t}\n\n\tswitch c.XPaddingPlacement {\n\tcase \"\":\n\t\tc.XPaddingPlacement = \"queryInHeader\"\n\tcase \"cookie\", \"header\", \"query\", \"queryInHeader\":\n\tdefault:\n\t\treturn nil, errors.New(\"unsupported padding placement: \" + c.XPaddingPlacement)\n\t}\n\n\tswitch c.XPaddingMethod {\n\tcase \"\":\n\t\tc.XPaddingMethod = \"repeat-x\"\n\tcase \"repeat-x\", \"tokenish\":\n\tdefault:\n\t\treturn nil, errors.New(\"unsupported padding method: \" + c.XPaddingMethod)\n\t}\n\n\tswitch c.UplinkDataPlacement {\n\tcase \"\":\n\t\tc.UplinkDataPlacement = splithttp.PlacementAuto\n\tcase splithttp.PlacementAuto, splithttp.PlacementBody:\n\tcase splithttp.PlacementCookie, splithttp.PlacementHeader:\n\t\tif c.Mode != \"packet-up\" {\n\t\t\treturn nil, errors.New(\"UplinkDataPlacement can be \" + c.UplinkDataPlacement + \" only in packet-up mode\")\n\t\t}\n\tdefault:\n\t\treturn nil, errors.New(\"unsupported uplink data placement: \" + c.UplinkDataPlacement)\n\t}\n\n\tif c.UplinkHTTPMethod == \"\" {\n\t\tc.UplinkHTTPMethod = \"POST\"\n\t}\n\tc.UplinkHTTPMethod = strings.ToUpper(c.UplinkHTTPMethod)","sourceCodeStart":341,"sourceCodeEnd":377,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/transport_method.go#L341-L377","documentation":"SplitHTTPConfig.Build() validates \"xPaddingMethod\" at transport_method.go:354-360. Empty defaults to \"repeat-x\"; only \"repeat-x\" and \"tokenish\" are accepted; any other value is appended to the error message.","triggerScenarios":"\"xPaddingMethod\": \"random\", \"none\", \"repeatx\", or any string other than the two supported padding methods in splithttp transportSettings.","commonSituations":"Assuming arbitrary padding algorithms exist; typos; configs generated for a different XHTTP fork with extra methods.","solutions":["Set \"xPaddingMethod\" to \"repeat-x\" or \"tokenish\"","Omit the field to use the \"repeat-x\" default"],"exampleFix":"// before\n\"xPaddingMethod\": \"random\"\n// after\n\"xPaddingMethod\": \"repeat-x\"","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"func validXPaddingMethod(m string) bool {\n\treturn m == \"\" || m == \"repeat-x\" || m == \"tokenish\"\n}","tryCatchPattern":null,"preventionTips":["Only repeat-x and tokenish exist; omit for repeat-x default"],"tags":["config","splithttp","padding","validation"],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}