简体   繁体   English

Perl CGI:在Perl升级后查询参数被忽略

[英]Perl CGI: query parameters are munged following Perl upgrade

We recently upgraded Perl from 5.8.4 to 5.16.1 (CGI version 3.59). 我们最近将Perl从5.8.4升级到5.16.1(CGI版本3.59)。 My web app has several pages which all pass data from one to the next via CGI forms. 我的Web应用程序有几个页面,所有页面都通过CGI表单将数据从一个页面传递到另一个页面。 When I insert a $query->Dump into each page, the first two pages are fine, but the third has completely munged data. 当我在每页中插入$ query-> Dump时,前两页都可以,但是第三页已完全删除了数据。 The name/value pairs aren't what you'd expect, there are names that shouldn't exist, etc. For example. 名称/值对不是您所期望的,有些名称不应该存在,等等。例如。 page 2 contains expected name/value pairs: 第2页包含预期的名称/值对:

Content-Type: text/html; 内容类型:text / html; charset=ISO-8859-1 字符集= ISO-8859-1

. selectedOrganism
    All
.  selectedExpters
    All
    LKRAMER

while page 3 has munged name/value pairs including: 而第3页的名称/值对包括以下内容:

. -----------------------------17694310364738783961604838496" 

   <with 12 null values>

. Content-Disposition: form-data

. All
     <3 null values>

. LKRAMER

     <null value>

This is running on our development box; 这正在我们的开发箱上运行; our production box hasn't been upgraded yet, the code is the same and there is no problem. 我们的生产包装盒尚未升级,代码相同,没有问题。

I found the problem. 我发现了问题。 Instead of instantiating the query object as: 而不是将查询对象实例化为:

    my $query = new CGI;

The code had: 该代码具有:

    my $query = CGI->new(\*STDIN);   

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM