[interchange] Allow name="0" in Content-Disposition header.

Dan Browning <[email protected]>
Newsgroups gmane.comp.web.interchange.cvs
Message-ID <[email protected]>
commit b29f34f55dec6211403fbbb421e775e1b029de48
Author: Daniel Browning <[email protected]>
Date:   Fri Apr 1 22:25:36 2011 -0700

    Allow name="0" in Content-Disposition header.
    
    Interchange was checking the Content-Disposition name for perly truth
    rather than definedness, which caused it to incorrectly disallow the valid
    name of "0". I ran into one particular program in the wild that happens
    to generate requests with just such headers:
    
     https://github.com/valums/file-uploader/

 lib/Vend/Server.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/Vend/Server.pm b/lib/Vend/Server.pm
index 42ad5d7..66f0caf 100644
--- a/lib/Vend/Server.pm
+++ b/lib/Vend/Server.pm
@@ -472,7 +472,7 @@ sub parse_multipart {
 			# Bug:  Netscape doesn't escape quotation marks in file names!!!
 			my($filename) = $header{'Content-Disposition'}=~/ filename="?([^\";]*)"?/;
 #::logDebug("param='$param' filename='$filename'" );
-			if(! $param) {
+			if(not defined $param) {
 				::logGlobal({ level => 'debug' }, "unsupported multipart header: \n%s\n", $header);
 				next;
 			}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.