From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Re: is (web client) ready for use even for the simplest task? Date: Tue, 10 Sep 2013 05:19:00 -0400 Message-ID: <87y575m3uj.fsf@tines.lan> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1378804777 542 80.91.229.3 (10 Sep 2013 09:19:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Sep 2013 09:19:37 +0000 (UTC) Cc: guile-user@gnu.org To: Darren Hoo Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Sep 10 11:19: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 1VJK6k-0003u1-7x for guile-user@m.gmane.org; Tue, 10 Sep 2013 11:19:38 +0200 Original-Received: from localhost ([::1]:56559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJK6j-0002et-KW for guile-user@m.gmane.org; Tue, 10 Sep 2013 05:19:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJK6T-0002dj-2Y for guile-user@gnu.org; Tue, 10 Sep 2013 05:19:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJK6L-0007CH-Pr for guile-user@gnu.org; Tue, 10 Sep 2013 05:19:21 -0400 Original-Received: from world.peace.net ([96.39.62.75]:56993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJK6L-0007CC-Ls for guile-user@gnu.org; Tue, 10 Sep 2013 05:19:13 -0400 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1VJK6F-0006L1-Du; Tue, 10 Sep 2013 05:19:07 -0400 In-Reply-To: (Darren Hoo's message of "Tue, 10 Sep 2013 12:13:46 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 96.39.62.75 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:10783 Archived-At: 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. > 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