Return-Path: Delivered-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Received: (qmail 6547 invoked from network); 27 Sep 2010 15:23:28 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Sep 2010 15:23:28 -0000 Received: (qmail 66987 invoked by uid 500); 27 Sep 2010 15:23:28 -0000 Delivered-To: apmail-incubator-deltacloud-dev-archive@incubator.apache.org Received: (qmail 66864 invoked by uid 500); 27 Sep 2010 15:23:28 -0000 Mailing-List: contact deltacloud-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltacloud-dev@incubator.apache.org Delivered-To: mailing list deltacloud-dev@incubator.apache.org Received: (qmail 66853 invoked by uid 99); 27 Sep 2010 15:23:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 15:23:27 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=10.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mfojtik@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 15:23:19 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8RFMvhZ005107 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 27 Sep 2010 11:22:58 -0400 Received: from patashnik.brq.redhat.com (dhcp-2-247.brq.redhat.com [10.34.2.247]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8RFMu1K027170 for ; Mon, 27 Sep 2010 11:22:57 -0400 From: mfojtik@redhat.com To: deltacloud-dev@incubator.apache.org Subject: Content negotiation rewamp (respond_to) Date: Mon, 27 Sep 2010 17:22:51 +0200 Message-Id: <1285600975-15121-1-git-send-email-mfojtik@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Virus-Checked: Checked by ClamAV on apache.org Hi all, As you probably all know, Marios is working on blob storage (buckets) so we will have a new namespace in API very soon. There are some issues in handling URI's related to our respond_to plugin: Marios want to use '/api/buckets/somebucket/myblob.txt' to get a single blob (file) from cloudfiles/s3, but unfortunatelly, there is an extension '.txt' which is now used by respond_to for content-negotiation. This 'extension-based-negotiation' is integrated deeply into respond_to plugin so making it 'configurable' could be very difficult. So instead of destroying current respond_to plugin with hacks I rewrote it from scratch, using some parts from old respond_to plugin. For now, this plugin can do better job in browser content negotiation (using rack-accept gem) and also there are no problem with extensions. They will be stripped before executing operation but they could be easely reconstructed using 'extension' helper. Right now all Test::Unit tests are green, but unfortunatelly Cucumber tests died. I dunno reason, seems like a internal problem in rack-accept. I'll do more investigation tomorrow... Once all tests will be green, I'll update client code as well. -- Michal