From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Blazej Adamczyk Newsgroups: gmane.emacs.bugs Subject: bug#13598: 24.3.50 Date: Mon, 3 Mar 2014 07:10:21 +0100 Message-ID: <481D100B-FD57-41C1-9F26-83EFB1C0CF25@gmail.com> References: <87d2wluuu9.fsf@online.de> <2DC22385-AACB-4B7D-9918-3EB835B8526C@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: multipart/signed; boundary="Apple-Mail=_76496F82-F466-4CA6-A62A-B36A07025DDB"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Trace: ger.gmane.org 1393827070 442 80.91.229.3 (3 Mar 2014 06:11:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Mar 2014 06:11:10 +0000 (UTC) Cc: 13598@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 03 07:11:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1WKM5u-0000ld-PY for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Mar 2014 07:11:19 +0100 Original-Received: from localhost ([::1]:38002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKM5u-0002Wq-2L for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Mar 2014 01:11:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKM5l-0002VC-5q for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2014 01:11:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKM5f-0003KG-AW for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2014 01:11:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKM5f-0003KA-7M for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2014 01:11:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WKM5e-0003dX-AZ for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2014 01:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Blazej Adamczyk Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Mar 2014 06:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13598 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13598-submit@debbugs.gnu.org id=B13598.139382703113936 (code B ref 13598); Mon, 03 Mar 2014 06:11:02 +0000 Original-Received: (at 13598) by debbugs.gnu.org; 3 Mar 2014 06:10:31 +0000 Original-Received: from localhost ([127.0.0.1]:48429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKM58-0003ch-2L for submit@debbugs.gnu.org; Mon, 03 Mar 2014 01:10:30 -0500 Original-Received: from mail-ea0-f169.google.com ([209.85.215.169]:34341) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKM53-0003cT-Jj for 13598@debbugs.gnu.org; Mon, 03 Mar 2014 01:10:26 -0500 Original-Received: by mail-ea0-f169.google.com with SMTP id h14so1321135eaj.0 for <13598@debbugs.gnu.org>; Sun, 02 Mar 2014 22:10:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=o1rvftSyaiD9Mrk5+C2GAc75oPfLliK0vYVwQdoi8gY=; b=hwubS4r8nAO6dnhS12DAyOXIRDYQUru+vmQr4bGtTNGboXMmHw6vvO+4rb0dQSWPJ3 b62DtWWZzBPeNuLK7JCCHW8lAGC/2JgZKGPhW5ehfz0H2RwL0a6UXiVcORTt2sDSKJ3R rr6ocX669848SY+zO7orxpx3v0Tkca4su0R7+/AsM8rFaPHLcAHZxKRa05wJw9BZ3DPK sP2VWkB8z9imVDulbdJ/lbEd2cVSDzdNiLf5Kw39muU1OAIWEZADbLInltF7HnPFgIat vllt9pxtxdBjIFP0ZTy0hrtZKi/aRKzcsaUFtQH5NombTjCKeU08Dd5kCrT6cB742DHe yW0A== X-Received: by 10.14.208.195 with SMTP id q43mr1091922eeo.102.1393827024677; Sun, 02 Mar 2014 22:10:24 -0800 (PST) Original-Received: from [192.168.1.100] ([87.204.33.177]) by mx.google.com with ESMTPSA id x6sm45705710eew.20.2014.03.02.22.10.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Mar 2014 22:10:23 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1827) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:86489 Archived-At: --Apple-Mail=_76496F82-F466-4CA6-A62A-B36A07025DDB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Ahh yes my mistake! I was looking at some wrong sources. Obviously the = current "^\r?\n" is correct.=20 Sorry and thanks! Blazej =46rom Glenn Morris w dniu 27 lut 2014, o godz. 23:43: Blazej Adamczyk wrote: By example: When parsing response we may get in state when we will receive only the following: "HTTP/1.0 200 OK^M " without double quotes (I added them to show the newline character). In case of current implementation the regexp "^\r?$" and the previous regexp "^\r*$" both are matching the end of string. That is wrong because there will be something in the new line after a while. The current implementation uses "^\r?\n", not "^\r?$". Where did you get "^\r?$" from? As such I do not see that it will match your example. RFC 2616 states clear: generic-message =3D start-line *(message-header CRLF) CRLF [ message-body ] start-line =3D Request-Line | Status-Line there has to be one (exactly one) CR in a single line between headers and body. Thus I propose a simple regexp "^\r$". Yes, but as I already quoted in http://debbugs.gnu.org/13598#17 it also recommends tolerance: The line terminator for message-header fields is the sequence CRLF. However, we recommend that applications, when parsing such headers, recognize a single LF as a line terminator and ignore the leading CR. --Apple-Mail=_76496F82-F466-4CA6-A62A-B36A07025DDB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQEcBAEBCAAGBQJTFBzNAAoJELcOb3l0I/e3dvMH/i6OYRVOoepzLFYN1aFTeZfm 52tFNu5ZN4X66hgLIcPsWhlGbJNfiCg+dDRDXMCyVUAq4EgmXL6Mm+WYGabaW+18 NxmYYucGmYUEsvysRCB/2wghqyxMt36Bc4NhG+3oaOYkwXgriZ7sADKPQeHF1MvJ DADH3xU8B9cK/tpIYlS3KDd5AGKaleGZ8kP5oWqrAbx0QcgYJMhqauio/vg6QkUh Ha7gWWZXi+dlHhUYwZmNExX4KYL/4EUNwHGHl4DQgR9TZdpA2E1jAznMFmKFXMD0 AnrPPSbmH6HHnViMBSzwJC59jmLctqU+pUVVuRoXQTwQY7bhEdBF1NFvu+Ekhk0= =f5Fn -----END PGP SIGNATURE----- --Apple-Mail=_76496F82-F466-4CA6-A62A-B36A07025DDB--