Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 166F1C118 for ; Sat, 19 May 2012 22:51:28 +0000 (UTC) Received: (qmail 96673 invoked by uid 500); 19 May 2012 22:51:26 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 96621 invoked by uid 500); 19 May 2012 22:51:26 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 96610 invoked by uid 99); 19 May 2012 22:51:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 May 2012 22:51:26 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chris.hankey@transamerica.com designates 216.32.180.16 as permitted sender) Received: from [216.32.180.16] (HELO va3outboundpool.messaging.microsoft.com) (216.32.180.16) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 May 2012 22:51:14 +0000 Received: from mail84-va3-R.bigfish.com (10.7.14.241) by VA3EHSOBE005.bigfish.com (10.7.40.25) with Microsoft SMTP Server id 14.1.225.23; Sat, 19 May 2012 22:50:42 +0000 Received: from mail84-va3 (localhost [127.0.0.1]) by mail84-va3-R.bigfish.com (Postfix) with ESMTP id 5EFB2C02B2 for ; Sat, 19 May 2012 22:50:42 +0000 (UTC) X-Forefront-Antispam-Report: CIP:162.123.17.225;KIP:(null);UIP:(null);IPV:NLI;H:aegonusa.com;RD:email2.aegonusa.com;EFVD:NLI X-SpamScore: -6 X-BigFish: VPS-6(zz9371I542Mzz1202hzz8275dhz2fh2a8h668h839h944hd25hf0ah) Received-SPF: pass (mail84-va3: domain of transamerica.com designates 162.123.17.225 as permitted sender) client-ip=162.123.17.225; envelope-from=chris.hankey@transamerica.com; helo=aegonusa.com ;aegonusa.com ; Received: from mail84-va3 (localhost.localdomain [127.0.0.1]) by mail84-va3 (MessageSwitch) id 1337467840362689_25912; Sat, 19 May 2012 22:50:40 +0000 (UTC) Received: from VA3EHSMHS001.bigfish.com (unknown [10.7.14.247]) by mail84-va3.bigfish.com (Postfix) with ESMTP id 4C6682E0048 for ; Sat, 19 May 2012 22:50:40 +0000 (UTC) Received: from aegonusa.com (162.123.17.225) by VA3EHSMHS001.bigfish.com (10.7.99.11) with Microsoft SMTP Server (TLS) id 14.1.225.23; Sat, 19 May 2012 22:50:39 +0000 Received: from ([162.123.17.230]) by crdcdmzim06.aegonusa.com with ESMTP with TLS id 31NVRH1.136150628; Sat, 19 May 2012 17:50:45 -0500 Received: from CREXZIX01.INET.NOGEA.LOCAL (ZixVPM [127.0.0.1]) by Outbound.aegonusa.com (Proprietary) with ESMTP id E42CE960396 for ; Sat, 19 May 2012 17:26:23 -0500 (CDT) Received: from CREXHTMAIL01.us.aegon.com (autodiscover.divinvest.com [162.123.194.95]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by CREXZIX01.INET.NOGEA.LOCAL (Proprietary) with ESMTP id 62023960393 for ; Sat, 19 May 2012 17:26:23 -0500 (CDT) Received: from CRHKEXHTMAIL01.ds.global (162.123.229.102) by CREXHTMAIL01.us.aegon.com (162.123.229.93) with Microsoft SMTP Server (TLS) id 14.1.323.3; Sat, 19 May 2012 17:50:45 -0500 Received: from CREXHTMAIL03.us.aegon.com ([169.254.3.122]) by CRHKEXHTMAIL01.ds.global ([169.254.2.138]) with mapi id 14.01.0323.003; Sat, 19 May 2012 17:50:44 -0500 From: "Hankey, Chris" To: "user@couchdb.apache.org" Subject: RE: Call to View returns 405. It's using OPTIONS not GET Thread-Topic: Call to View returns 405. It's using OPTIONS not GET Thread-Index: AQHNNgnZKgquiatR0EuobIruJpzaQZbSC18Q Date: Sat, 19 May 2012 22:50:43 +0000 Message-ID: <6BA11CBD97F4DC469B8CB603C5B990FA237EA1A3@CREXHTMAIL03.us.aegon.com> References: <4FB69C07.7070705@cedarsoft.com> <4FB6B7BC.9080403@cedarsoft.com> <4FB7F7D7.2040203@cedarsoft.com> <6BA11CBD97F4DC469B8CB603C5B990FA237EA17C@CREXHTMAIL03.us.aegon.com> In-Reply-To: <6BA11CBD97F4DC469B8CB603C5B990FA237EA17C@CREXHTMAIL03.us.aegon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-puzzleid: {8EE36B5E-2684-469A-8AAB-D85C57237573} x-cr-hashedpuzzle: P+o= AciG CHT6 CNlY Cig1 Dv10 Ef36 EuPb Eudr FEny Hdje H2Qk IVv6 Ivo0 KQV9 LQJz;1;dQBzAGUAcgBAAGMAbwB1AGMAaABkAGIALgBhAHAAYQBjAGgAZQAuAG8AcgBnAA==;Sosha1_v1;7;{8EE36B5E-2684-469A-8AAB-D85C57237573};YwBoAHIAaQBzAC4AaABhAG4AawBlAHkAQAB0AHIAYQBuAHMAYQBtAGUAcgBpAGMAYQAuAGMAbwBtAA==;Sat, 19 May 2012 22:50:40 GMT;UgBFADoAIABDAGEAbABsACAAdABvACAAVgBpAGUAdwAgAHIAZQB0AHUAcgBuAHMAIAA0ADAANQAuACAAIABJAHQAJwBzACAAdQBzAGkAbgBnACAATwBQAFQASQBPAE4AUwAgAG4AbwB0ACAARwBFAFQA x-originating-ip: [162.123.56.60] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: 7562670a-beab-4c6e-8ed2-ab3b5287c042 X-OriginatorOrg: transamerica.com This is just some more info. Where is "OPTIONS" coming from? It looks lik= e the view function tries to use GET, but we end up with OPTIONS. OPTIONS http://test:5984/forms/_design/formlist/_view/formlist HTTP/1.1 Host: test:5984 Connection: keep-alive Access-Control-Request-Method: GET Origin: null User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Ge= cko) Chrome/18.0.1025.168 Safari/535.19 Access-Control-Request-Headers: origin, content-type, accept Accept: */* Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=3D0.8 Accept-Charset: ISO-8859-1,utf-8;q=3D0.7,*;q=3D0.3 -----Original Message----- From: Hankey, Chris [mailto:Chris.Hankey@Transamerica.com]=20 Sent: Saturday, May 19, 2012 5:54 PM To: user@couchdb.apache.org Subject: Call to View returns 405. It's using OPTIONS not GET I'm trying to call a view using the CouchDB Javascript API. The $db.view c= all is failing with a "405 Method Not Allowed" error. $db.view is generati= ng the correct URL, but the call appears to be failing because the view fun= ction is using HTTP OPTIONS method ( or maybe JQuery). If I change the HTT= P method to GET & manually send the HTTP request, then it works fine. I ne= ed $db.view to generate a GET. Any thoughts? Thanks Chris ----------- Sample Code ----------- $.couch.urlPrefix =3D"http://test:5984" $db =3D $.couch.db("forms"); function GetFormList() { =20 $("div#forms").empty(); =20 $db.view("formviews/formlist", { =20 success: function(data) { =20 for (i in data.rows) { =20 id =3D data.rows[i].id; =20 html =3D '
' + =20 '' + id + ' ' + =20 'edit '+ =20 'delete '+ =20 '
'; =20 $("div#forms").append(html); =20 } =20 }}); =20 } =20