1

이 모든 것은 DHTMLX v4.0.3으로 이전했을 때 시작되었습니다. 이제 dhtmlxForm.send() 함수가 HTTP 상태 400을 반환합니다. "클라이언트가 보낸 요청의 구문이 올바르지 않습니다 ."POST에 아무 것도 표시되지 않습니다. 나는 그들이 값이없는 무작위로 생성 된 항목 "dhxr1422484613542"를 포함하고 있다는 것을 알았습니다. 이것이 HTTP 400을 던지고있는 이유는 무엇입니까? 감사!DHTMLX dhtmlxForm.send() HTTP 상태 400을 던집니다. "클라이언트가 보낸 요청은 구문 상 올바르지 않습니다."

헤더 탭 : enter image description here 미리보기 탭 : enter image description here 자바 스크립트 :

dhtmlxEvent(window,"load",function(){ 
    var dhxLayout = new dhtmlXLayoutObject(document.body, '1C'); 

    var f = dhxLayout.cells("a").attachForm([ 
     {type:"settings", position:"label-left", labelAlign:"right", labelWidth:150, inputWidth:150}, 
     {type:"hidden", name:"method", value:"getJson"}, 
     {type:"hidden", name:"proc", value:"c3.chgpwd"}, 
     {type:"password", name:"oldpwd", label:"Current Password", required:true}, 
     {type:"password", id:"newpwd", name:"newpwd", label:"New Password", required:true}, 
     {type:"password", name:"confirmpwd", label:"New Password (Again)", required:true}, 
     {type:"button", name:"submit", width:50, offsetLeft:150, value:"Submit"} 
    ]); 
    f.attachEvent("onButtonClick", function(name){ 
     /* Here is the POST that used to work, but since v4.0.3 it throws a HTTP 400 */ 
     f.send("lib.cfc?method=getJson&proc=c3.chgpwd","post",function(loader, response){ 
      console.log(response); /*This is never reached, see attachments for the error reported during the POST*/ 
     }); 
    }); 
}); 

답변

0

나는 동일한 기호가없는 경우 아파치가 URL 매개 변수를 처리 할 수없는 것으로 나타났습니다 이름 뒤에.

그래서 URL은 같은 :

http://domain.com?x=22&y 

아파치 이해할 수 없습니다.

dhtmlx 팀이 아파치를 사용하지 않는 것 같아요.

+0

하지만 POST를하고 있습니다. GET이 아닙니다. DHTMLX 4.1.2로 업데이트되었으며 문제는 해결되었습니다. – gfrobenius

+0

Apache는 GET과 POST에서 name = value를 기대합니다. 4.1.2에서, 당신은 아마도'window.dhx4.ajax.cache = false; '로 캐시를 끄고있을 것이다. –

관련 문제