diff Lib/IMPL/Web/Application/Resource.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 814d755e5d12
line wrap: on
line diff
--- a/Lib/IMPL/Web/Application/Resource.pm	Mon Oct 22 04:09:27 2012 +0400
+++ b/Lib/IMPL/Web/Application/Resource.pm	Mon Oct 29 03:15:22 2012 +0400
@@ -51,8 +51,10 @@
           allow => join( ',', map( uc, keys %{ $this->contract->verbs } ) )
       )
         unless $operation;
-        
-      $action->context->{resourceLocation} = $this->location; 
+      
+      # в случае, когда один ресурс вызывает HTTP метод другого ресурса, нужно
+      # сохранить оригинальный resourceLocation  
+      $action->context->{resourceLocation} ||= $this->location; 
 
       return $operation->Invoke( $this, $action );
 }