From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.user Subject: Re: is (web client) ready for use even for the simplest task? Date: Tue, 10 Sep 2013 17:46:24 +0800 Organization: HFG Message-ID: <1378806384.4642.31.camel@Renee-desktop.suse> References: <87y575m3uj.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1378806455 20009 80.91.229.3 (10 Sep 2013 09:47:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Sep 2013 09:47:35 +0000 (UTC) Cc: guile-user@gnu.org, Darren Hoo To: Mark H Weaver Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Sep 10 11:47:38 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VJKXq-0005jq-0g for guile-user@m.gmane.org; Tue, 10 Sep 2013 11:47:38 +0200 Original-Received: from localhost ([::1]:56695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJKXp-0002pV-Lh for guile-user@m.gmane.org; Tue, 10 Sep 2013 05:47:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJKWr-0001AF-Fc for guile-user@gnu.org; Tue, 10 Sep 2013 05:46:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJKWj-0006tn-0N for guile-user@gnu.org; Tue, 10 Sep 2013 05:46:37 -0400 Original-Received: from mail-pd0-x229.google.com ([2607:f8b0:400e:c02::229]:53158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJKWi-0006tf-Pg for guile-user@gnu.org; Tue, 10 Sep 2013 05:46:28 -0400 Original-Received: by mail-pd0-f169.google.com with SMTP id r10so7468566pdi.28 for ; Tue, 10 Sep 2013 02:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :organization:content-type:mime-version:content-transfer-encoding; bh=M70/wAJYBkhR6llr+CAWoHenq42UaiTfwKv2MxVw4pE=; b=0BywOraS1y1vaMyVLpwQqlq9iTJTk8+OBH+F5eAKfSpV6gRQMROEzvOW/87DPntY4a P4/YXhNMWD2sI7PZo8qb38Wn0+nQVi65Rr1ccPhnF2O5UbrWF0JxCwoEBd+hYRIxF4pV m8dTC8Yg1fiTHokQ0KKFJNgoeMrE3GmA0hmdYKvDT0Xw+v9pLmdl8ZewMCNjcWoBtDLh imbklnRpDbIS/o8n7bsJFeXoQM6aQdUx5yCxeAIW8fw/NfisvfJxNj5kUYYUqGWN2hxB yEM/Rm15liN59ekoLFx12s4KM+GDbzjyy/yuL5QkjWp7W97AizZTIJAjI/7PUmZHMhFD Fcjg== X-Received: by 10.66.234.193 with SMTP id ug1mr25336620pac.92.1378806387799; Tue, 10 Sep 2013 02:46:27 -0700 (PDT) Original-Received: from [147.2.147.112] ([203.192.156.9]) by mx.google.com with ESMTPSA id yo2sm23520668pab.8.1969.12.31.16.00.00 (version=SSLv3 cipher=RC4-SHA bits=128/128); Tue, 10 Sep 2013 02:46:27 -0700 (PDT) In-Reply-To: <87y575m3uj.fsf@tines.lan> X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::229 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10784 Archived-At: On Tue, 2013-09-10 at 05:19 -0400, Mark H Weaver wrote: > Darren Hoo writes: > > > (use-modules (web client)) > > > > (http-post "http://www.google.com/") > > > > the POST request is sent without the Content-Length header > > RFC 2616 makes it clear that the Content-Length header is optional. > I have to mention that Firefox seems not happy if the header not contain Content-Length. When I tested Artanis redirect function under FF, it's just halt anyway, but chrome is OK. And I fixed the issue by adding this to response: Content-Length: 0 That is so-called ridiculous. But RFC 2616 wrote: ---------------------------cut---------------------------- body is not defined by this specification, but might be defined by future extensions to HTTP. Content negotiation MAY be used to select the appropriate response format. If no response body is included, the response MUST include a Content-Length field with a field-value of "0". ---------------------------end---------------------------- > > OK, let's add something to the body > > > > (http-post "http://www.google.com/" #:body "") > > > > Howcome the request now becomes an http GET request: > > > > GET / HTTP/1.1 > > Content-Type: text/plain;charset=utf-8 > > Host: www.google.com > > Connection: close > > I just applied a fix for this to the stable-2.0 branch in git. In the > meantime, the workaround is to explicitly pass a content-type header > that specifies the charset, like this: > > (http-post "http://www.google.com/" > #:body "" > #:headers '((content-type text/plain (charset . "utf-8")))) > > > This is really ridiculous. > > You found a bug. It happens. There's no need to be obnoxious about it. > > Mark >