From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Klaus Straubinger Newsgroups: gmane.emacs.help Subject: Re: Stripping HTTP headers from an HTTP response? Date: Wed, 16 Dec 2009 08:31:06 +0100 () Organization: not organised Message-ID: References: <0e7021ea-7b88-4631-ad47-d241eb54d6eb@j19g2000yqk.googlegroups.com> <87oclzkiu2.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1260949259 24603 80.91.229.12 (16 Dec 2009 07:40:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Dec 2009 07:40:59 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 16 08:40:52 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NKoV9-0001vX-SK for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Dec 2009 08:40:52 +0100 Original-Received: from localhost ([127.0.0.1]:49368 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKoV4-0001VG-Rf for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Dec 2009 02:40:46 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.glorb.com!news2.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.sap-ag.de!news1!news.sap-ag.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 Original-NNTP-Posting-Host: +f4nMMsCSA2u9ptJ+dOvig.news.sap-ag.de Original-X-Trace: news.sap-ag.de 1260948666 23773 +f4nMMsCSA2u9ptJ+dOvig.news.sap-ag.de (16 Dec 2009 07:31:06 GMT) Original-X-Complaints-To: newsmaster@sap.com Original-NNTP-Posting-Date: Wed, 16 Dec 2009 07:31:06 +0000 (UTC) X-No-Archive: Yes User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 Mail-Copies-To: nobody Original-Xref: news.stanford.edu gnu.emacs.help:175597 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-Gmane-Expiry: 2009-12-30 Xref: news.gmane.org gmane.emacs.help:70672 Archived-At: Tim X wrote: > Another place to get some ideas would be the sources to emacs w3. And there we find | (defun w3-download-callback (fname) | (let ((coding-system-for-write 'binary)) | (goto-char (point-min)) | (search-forward "\n\n" nil t) | (write-region (point) (point-max) fname)) | (url-mark-buffer-as-dead (current-buffer)) | (message "Download of %s complete." (url-view-url t)) | (sit-for 3)) The simple solution to search for the first empty line seemed to be good enough. -- Klaus Straubinger