调试:IE6 + SSL + AJAX +交表= 404错误错误、SSL、AJAX

2023-09-10 14:30:34 作者:世界与我无关

的设置: 有问题的程序试图通过Ajax调用包含在同一个包调用者的目标程序发布表单数据。这样做是为了使用安全连接( HTTPS )网站。这里所使用的技术是 PLSQL 和的道场的JavaScript库。该开发工具是基本上是一个文本编辑器。

ç段 $ C $:

  

功能testPost(){

          

dojo.xhrPost({                  网址:''dr_tm_w_0120.test_post'',                  形式:''orgForm'',                  负载:testPostXHRCallback,                  错误:testPostXHRError                 });           }

        

功能testPostXHRCallback(数据,ioArgs){

     

 警报(''后回调'');
      尝试{
      dojo.byId(messageDiv)的innerHTML =数据。
      }
      赶上(前){
            如果(ex.name ==类型错误)
            {
              警报(发生错误类型。);
            }
      }
      返回的数据;
   }
 

        

功能testPostXHRError(数据,ioArgs){

     

 警报(数据);
      警报('''从服务器检索数据时错误!);
      返回的数据;
   }
 

  

的问题: 当使用IE6(其中整个用户群使用),响应发送从服务器返回一个404错误。

的意见: 该项目工程罚款的Firefox。 调用过程不能指向同一个包中的任何程序。 调用程序可以针对境外网站(包括HTTP,HTTPS)。 在不属于形式的数据,做工精细的帖子包的其他AJAX调用。 我搜索了的互联网络的,并咨询了高级技能的团队成员,并没有发现任何东西,圆满解决了上述问题。 *尝试 Q&放大器; A 了在道场支持论坛。

的问题: 你推荐什么故障排除方法? 哪些故障排除工具你推荐HTTPS分析? 什么问题可能是任何假设? 任何想法的解决方法是不是总(坏)黑客?

埃德。解决方案 lomaxx,THX为小提琴手提示。你不知道它是如何真棒是为了获取并使用它作为一个调试工具。启动起来后,这是我发现了,我该如何修复它(至少在短期内):

  

EF周五,2008年8月8日14点零一分26秒格林尼治标准​​时间dr_tm_w_0120.test_post:签名(参数名称)在形式上不匹配变量未手续:SO1_DISPLAYED_,PO1_DISPLAYED_,RWA2_DISPLAYED_,手续DD1_DISPLAYED_非默认的变量不在形式上:0

看到该邮件从服务器后,我踢周围的小提琴手多一点,看看还有什么我可以从中吸取教训。研究发现,有一个WebForms的标签显示在Web表单中的值。难道你不知道吧,xxx_DISPLAYED_领域上面有它。

我真的不明白,为什么还没有这些领域存在的,因为我没有明确地在网络PLSQL code创建。但我现在明白了,目标过程必须包括它们作为参数才能正常工作。再次,这是只有在IE6的情况下,对我来说,作为Firefox的正常工作。

嗯,这在短期内答案,破解修复它。我们希望,在这方面多一点的工作将导致更好地了解基本面回事。

解决方案

第一停靠港将是火起来拉琴并分析数据要与从浏览器

看看标题,实际上是被称为URL和PARAMS(如果有的话)被传递到了AJAX方法,看看这一切看起来好让服务器之前。

关于AJAX提交页面的js判断

如果说一切看起来正常,请问有什么办法可以验证它的实际命中通过日志记录的服务器,或跟踪的AJAX方法?

编辑:另一件事我会尝试是搭起一个测试页面使用非基于AJAX调用来调用服务器上的AJAX方法和分析小提琴手的交通和比较两个

The Setting: The program in question tries to post form data via an AJAX call to a target procedure contained in the same package as the caller. This is done for a site that uses a secure connection (https). The technology used here is PLSQL and the DOJO JavaScript library. The development tool is basically a text editor.

Code Snippet:

function testPost() {

dojo.xhrPost( { url: ''dr_tm_w_0120.test_post'', form: ''orgForm'', load: testPostXHRCallback, error: testPostXHRError }); }

function testPostXHRCallback(data,ioArgs) {

     alert(''post callback'');  
      try{  
      dojo.byId("messageDiv").innerHTML = data;  
      }  
      catch(ex){  
            if(ex.name == "TypeError")  
            {  
              alert("A type error occurred.");  
            }  
      }   
      return data;  
   }

function testPostXHRError(data, ioArgs) {

     alert(data);  
      alert(''Error when retrieving data from the server!'');  
      return data;  
   }

The Problem: When using IE6 (which the entire user-base uses), the response sent back from the server is a 404 error.

Observations: The program works fine in Firefox. The calling procedure cannot target any procedures within the same package. The calling procedure can target outside sites (both http, https). The other AJAX calls in the package that are not posts of form data work fine. I've searched the internets and consulted with senior-skilled team members and haven't discovered anything that satisfactorily addresses the issue. *Tried Q&A over at Dojo support forums.

The Questions: What troubleshooting techniques do you recommend? What troubleshooting tools do you recommend for HTTPS analyzing? Any hypotheses on what the issue might be? Any ideas for workarounds that aren't total (bad) hacks?

Ed. The Solution lomaxx, thx for the fiddler tip. you have no idea how awesome it was to get that and use it as a debugging tool. after starting it up this is what i found and how i fixed it (at least in the short term):

ef Fri, 8 Aug 2008 14:01:26 GMT dr_tm_w_0120.test_post: SIGNATURE (parameter names) MISMATCH VARIABLES IN FORM NOT IN PROCEDURE: SO1_DISPLAYED_,PO1_DISPLAYED_,RWA2_DISPLAYED_,DD1_DISPLAYED_ NON-DEFAULT VARIABLES IN PROCEDURE NOT IN FORM: 0

After seeing that message from the server, I kicked around Fiddler a bit more to see what else I could learn from it. Found that there's a WebForms tab that shows the values in the web form. Wouldn't you know it, the "xxx_DISPLAYED_" fields above were in it.

I don't really understand yet why these fields exist, because I didn't create them explicitly in the web PLSQL code. But I do understand now that the target procedure has to include them as parameters to work correctly. Again, this is only in the case of IE6 for me, as Firefox worked fine.

Well, that the short term answer and hack to fix it. Hopefully, a little more work in this area will lead to a better understanding of the fundamentals going on here.

解决方案

First port of call would be to fire up Fiddler and analyze the data going to and from the browser.

Take a look at the headers, the url actually being called and the params (if any) being passed to the AJAX method and see if it all looks good before getting to the server.

If that all looks ok, is there any way you can verify it's actually hitting the server via logging, or tracing in the AJAX method?

ed: another thing I would try is rig up a test page to call the AJAX method on the server using a non-ajax based call and analyze the traffic in fiddler and compare the two.