diff Lib/IMPL/Web/Application/Action.pm @ 245:7c517134c42f

Added Unsupported media type Web exception corrected resourceLocation setting in the resource Implemented localizable resources for text messages fixed TT view scopings, INIT block in controls now sets globals correctly.
author sergey
date Mon, 29 Oct 2012 03:15:22 +0400
parents a02b110da931
children 32aceba4ee6d
line wrap: on
line diff
--- a/Lib/IMPL/Web/Application/Action.pm	Mon Oct 22 04:09:27 2012 +0400
+++ b/Lib/IMPL/Web/Application/Action.pm	Mon Oct 29 03:15:22 2012 +0400
@@ -32,7 +32,21 @@
 sub param {
     my ($this,$name,$rx) = @_;
     
-    $this->_launder(scalar( $this->query->param($name) ), $rx );
+    my $value;
+    
+    if (
+        $this->requestMethod eq 'GET'
+        or
+        $this->query->content_type eq 'multipart/form-data'
+        or
+        $this->query->content_type eq 'application/x-www-form-urlencoded'
+    ) {
+        $value = scalar( $this->query->param($name) );
+    } else {
+        $value = scalar( $this->query->url_param($name) );
+    }
+    
+    $this->_launder($value, $rx );
 }
 
 sub requestMethod {