[Jifty-commit] r4556 - in Net-Jifty: .

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Nov 28 16:42:27 EST 2007


Author: sterling
Date: Wed Nov 28 16:42:26 2007
New Revision: 4556

Modified:
   Net-Jifty/   (props changed)
   Net-Jifty/lib/Net/Jifty.pm

Log:
 r14260 at riddle:  andrew | 2007-11-28 15:41:42 -0600
 Added a hunk of code to work-around a problem in Jifty's REST plugin since Net::Jifty might be used to access old Jiftys that have this problem: the redirect on update fails to remember the .yml on the end.


Modified: Net-Jifty/lib/Net/Jifty.pm
==============================================================================
--- Net-Jifty/lib/Net/Jifty.pm	(original)
+++ Net-Jifty/lib/Net/Jifty.pm	Wed Nov 28 16:42:26 2007
@@ -307,6 +307,16 @@
         }
 
         $res = $self->ua->request($req);
+
+        # XXX Compensation for a bug in Jifty::Plugin::REST... it doesn't
+        # remember to add .yml when redirecting after an update, so we will
+        # try to do that ourselves... fixed in a Jifty coming to stores near
+        # you soon!
+        if ($res->is_success && $res->content_type eq 'text/html') {
+            $req = $res->request->clone;
+            $req->uri($req->uri . '.yml');
+            $res = $self->ua->request($req);
+        }
     }
 
     if ($res->is_success) {


More information about the Jifty-commit mailing list