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 F0A883337 for ; Sun, 8 May 2011 22:20:57 +0000 (UTC) Received: (qmail 27506 invoked by uid 500); 8 May 2011 22:20:56 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 27468 invoked by uid 500); 8 May 2011 22:20:56 -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 27460 invoked by uid 99); 8 May 2011 22:20:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 May 2011 22:20:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of leccine@gmail.com designates 209.85.220.180 as permitted sender) Received: from [209.85.220.180] (HELO mail-vx0-f180.google.com) (209.85.220.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 May 2011 22:20:49 +0000 Received: by vxk12 with SMTP id 12so8014636vxk.11 for ; Sun, 08 May 2011 15:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=W/MnYKtQKNlEcLkubAZpviOl/6vk4OZ3sL3LqAMf4dY=; b=nYgp88ZAXGLY4WYlgFiRa03hrxf24CPD0zLHEOk+XaUaObbWsfrVzysgcTaIBi+7vY Kf4jwTZy31O0TqUOZoeKHQScqVfMGKEx+iLaA8dCwvyDQYySBMIQBGApAbrRu3sRllBl aY4ChcO6Nm/Mgk61LHOIWf+VoI8y088X3t9I4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=xC6VS8TZzWq+PgN17HN+nA978VOcbMuBS4WgvkzBFbCkU+CCA7jaEj+1izQzM309g4 WknI+4QQAllgLVRMm8a/tsu+XeCphvaVAr+iQzPBvJUdsgTEwJBA0cc8DsFIYrgIxi9l VWHY1KpQpULo3jk4KZw0T08oNVFE6eik8vsLA= MIME-Version: 1.0 Received: by 10.52.172.242 with SMTP id bf18mr2580165vdc.161.1304893228885; Sun, 08 May 2011 15:20:28 -0700 (PDT) Received: by 10.52.186.1 with HTTP; Sun, 8 May 2011 15:20:28 -0700 (PDT) In-Reply-To: References: Date: Sun, 8 May 2011 23:20:28 +0100 Message-ID: Subject: Re: how to change the default content-type From: =?UTF-8?Q?Istv=C3=A1n?= To: user Content-Type: multipart/alternative; boundary=bcaec51ba41160a7b904a2cb21ba X-Virus-Checked: Checked by ClamAV on apache.org --bcaec51ba41160a7b904a2cb21ba Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable This is why i asked about the _default_ in my email, I don't want to specif= y it with every request. This is not even nginx but couchdb. You can try it yourself talking to couchdb without a reverse proxy. On Sat, May 7, 2011 at 5:40 PM, Alexander Shorin wrote: > Try to pass "Accept: application/json" header instead of > "Content-Type" which marks type of returned content, not requested. > Missed Accept headers means all types are expectable and nginx thought > that text/plain is good one. > > ------------------ > ,,,^..^,,, > > > > On Sat, May 7, 2011 at 8:12 PM, Istv=C3=A1n wrote: > > $ curl -D - -X GET -H "Content-Type: application/json" > > http://couch.nohup.hu/nohup_urls/c08b5c2c03d31ee767ab891223000d72 > > HTTP/1.1 200 OK > > Server: nginx/1.0.0 > > Date: Sat, 07 May 2011 16:11:57 GMT > > Content-Type: text/plain;charset=3Dutf-8 > > Connection: keep-alive > > Vary: Accept-Encoding > > Etag: "1-e643d169eb8593e9354012fb7a082605" > > Content-Length: 209 > > Cache-Control: must-revalidate > > > > I would like the change the _default_ behavior to application/json > > > > I. > > > > On Sat, May 7, 2011 at 4:34 PM, Alexander Shorin > wrote: > > > >> Is it for show documents? Just return {json: } in this case= . > >> > >> ------------------ > >> ,,,^..^,,, > >> > >> > >> > >> On Sat, May 7, 2011 at 7:24 PM, Istv=C3=A1n wrote: > >> > Hi, > >> > > >> > is there an easy way to change the default content type > >> > from text/plain;charset=3Dutf-8 to application/json somehow? > >> > > >> > Regards, > >> > Istvan > >> > > >> > > >> > -- > >> > the sun shines for all > >> > > >> > > > > > > > > -- > > the sun shines for all > > > --=20 the sun shines for all --bcaec51ba41160a7b904a2cb21ba--