寮傚父瑙e喅锛欼nvalid character found in the request target. The valid characters are defined in RFC 7230 a

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了寮傚父瑙e喅锛欼nvalid character found in the request target. The valid characters are defined in RFC 7230 a相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/doc' title='doc'>doc   app   creat   name   post璇锋眰   璁块棶   浣跨敤   function   鍚庡彴   

鍓嶈█锛?/h3>

鍦ㄧ敤IE娴忚鍣ㄦ椂璁块棶tomcat椤圭洰鏃讹紝椤甸潰鎶?00閿欒锛屽悗鍙伴敊璇細

java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

鍦ㄧ綉涓婃煡寰楄祫鏂欐椂鍥犱负Tomcat鐗堟湰鍦?浠ュ悗浼氬http璇锋眰杩涜楠岃瘉

瑙e喅鍔炴硶:

1.浣跨敤encodeURI鍑芥暟锛屽洜涓篒E娴忚鍣ㄦ棤娉曞URL鑷姩杞箟

2.JS浣跨敤post璇锋眰

//鍙戦€丳OST璇锋眰璺宠浆鍒版寚瀹氶〉闈?function httpPost(URL, PARAMS) {
    var temp = document.createElement("form");
    temp.action = URL;
    temp.method = "post";
    temp.style.display = "none";

    for (var x in PARAMS) {
        var opt = document.createElement("textarea");
        opt.name = x;
        opt.value = PARAMS[x];
        temp.appendChild(opt);
    }

    document.body.appendChild(temp);
    temp.submit();

    return temp;
}

以上是关于寮傚父瑙e喅锛欼nvalid character found in the request target. The valid characters are defined in RFC 7230 a的主要内容,如果未能解决你的问题,请参考以下文章

寮傚父鈥斺€攃md涓媕avac閿欒锛氱紪鐮丟BK涓嶅彲鏄犲皠瀛楃

鏃犳剰璇嗙殑閫掑綊

瀛︿範璁″垝