Return-Path: Delivered-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Received: (qmail 2874 invoked from network); 13 Jan 2011 14:48:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jan 2011 14:48:59 -0000 Received: (qmail 16618 invoked by uid 500); 13 Jan 2011 14:48:59 -0000 Delivered-To: apmail-incubator-deltacloud-dev-archive@incubator.apache.org Received: (qmail 16523 invoked by uid 500); 13 Jan 2011 14:48:57 -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 16501 invoked by uid 99); 13 Jan 2011 14:48:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 14:48:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of woodstae@gmail.com designates 209.85.216.175 as permitted sender) Received: from [209.85.216.175] (HELO mail-qy0-f175.google.com) (209.85.216.175) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 14:48:51 +0000 Received: by qyk8 with SMTP id 8so4852001qyk.6 for ; Thu, 13 Jan 2011 06:48:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:mime-version:content-type:subject:date :in-reply-to:to:references:message-id:x-mailer; bh=Kun5yDX5ZSipPKlJuCI1qvXB6oqZy218oL1Wq1Rgw5U=; b=Nx8Xqnec4hxHhrzYzF43c+Wl/wukrI//oEpua7qyZn8vqzpm4AGn0Wk1UjjP2QCqx3 P1ABkQmHFWKs3P56CNdgdcfsls+ck2gn2RpW9rKF6asChjNe0heM2gXoFlyST8erKkvc mDxObb4HXPOClq55cv28aZIXC1UuykuQRja+M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; b=u3mGQDNHyNm9BnPjMJNhesFwUjnL5/O8J4HPbVCuQodzJng2w0AE9Zvcq53Y+Jz0mQ 2IKMhfqaVjjwI8/EI0ARdAnbSYXYxFT+J6u7vrdX/n8AowCpGpOkhTCPSKFdUDZgI/aX DxdVbDm1TW8/gJSWrzT4p0Y97klE5Sh8LdETc= Received: by 10.229.85.207 with SMTP id p15mr2067422qcl.167.1294930110419; Thu, 13 Jan 2011 06:48:30 -0800 (PST) Received: from dyn9027210191.raleigh.ibm.com (bi01p1.nc.us.ibm.com [129.33.49.251]) by mx.google.com with ESMTPS id h20sm97560qck.0.2011.01.13.06.48.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Jan 2011 06:48:29 -0800 (PST) From: Eric Woods Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/alternative; boundary=Apple-Mail-4-942811984 Subject: Re: Server returns JSON, not HTML Date: Thu, 13 Jan 2011 09:48:28 -0500 In-Reply-To: <20110113095708.GB3242@redhat.com> To: deltacloud-dev@incubator.apache.org References: <7C48B6FF-92DA-4FF9-8123-9EA07BD2D0CA@gmail.com> <1294875350.25146.25.camel@avon.watzmann.net> <20110113095708.GB3242@redhat.com> Message-Id: <266FD0B2-BC0B-4C3A-A158-7E335447D501@gmail.com> X-Mailer: Apple Mail (2.1082) --Apple-Mail-4-942811984 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I'm running Firefox on both the Windows and the Mac machines. Michal is = right, forcing HTML via ?format=3Dhtml in the URL does the trick. It = would be odd if two instances of Firefox formed the request differently. = It could be related to Firefox tooling I have installed on the mac. I don't have access to the Windows machine atm, but Firebug on the Mac = indicates the following Accept header is used (with or without = ?format=3Dhtml appended to the URL): Accept: = text/html,application/xhtml+xml,application/xml;q=3D0.9,*/*;q=3D0.8,applic= ation/json Since text/html is always given priority in the request header, it looks = like the server takes extra steps to handle the URL parameter correctly. = Thanks for your help. - Eric W. On Jan 13, 2011, at 4:57 AM, Michal Fojtik wrote: > On 12/01/11 15:35 -0800, David Lutterkort wrote: >> On Wed, 2011-01-12 at 14:31 -0500, Eric Woods wrote: >>> I'm trying to access the Deltacloud's HTML front-end for the mock & >>> EC2 drivers. After starting the server and pointing my browser to >>> http://localhost:3001/api, the server only returns the JSON API, not >>> HTML. I'm currently running on Mac OSX. Interestingly, when I >>> installed Deltacloud on a Windows 7 machine this morning, HTML was >>> served as expected. Any ideas what could cause this? >>=20 >> Is this with Safari ? I remember darkly that webkit has a rather >> interesting choice for its default Accept header, which makes it not = all >> that useful for content negotiation[1] >=20 > Well we tested it right now using Safari 5 on MacOSX and it returns = HTML. > Could you please debug it more for us ? >=20 > -- Michal >=20 >>=20 >> You can force that HTML be sent back by appending '?format=3Dhtml' to = each >> URL. Not sure if there's a way to fix the Safari Accept header to >> something sensible. >>=20 >> David >>=20 >> [1] = http://www.gethifi.com/blog/webkit-team-admits-accept-header-error has = the >> gory details. Also see = https://bugs.webkit.org/show_bug.cgi?id=3D27267 >>=20 >>=20 >=20 > --=20 > -------------------------------------------------------- > Michal Fojtik, mfojtik@redhat.com > Deltacloud API: http://deltacloud.org > -------------------------------------------------------- --Apple-Mail-4-942811984--