From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#13598: 24.3.50 Date: Thu, 27 Feb 2014 17:43:08 -0500 Message-ID: References: <87d2wluuu9.fsf@online.de> <2DC22385-AACB-4B7D-9918-3EB835B8526C@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1393543439 20100 80.91.229.3 (27 Feb 2014 23:23:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Feb 2014 23:23:59 +0000 (UTC) Cc: 13598@debbugs.gnu.org To: Blazej Adamczyk Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 28 00:24:07 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 1WJAJC-0006sO-HQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Feb 2014 00:24:06 +0100 Original-Received: from localhost ([::1]:48562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJAJB-0001Mn-Ts for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Feb 2014 18:24:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJAJ7-0001Md-Le for bug-gnu-emacs@gnu.org; Thu, 27 Feb 2014 18:24:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJAJ6-0002uS-Hz for bug-gnu-emacs@gnu.org; Thu, 27 Feb 2014 18:24:01 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJAJ6-0002uD-Eh for bug-gnu-emacs@gnu.org; Thu, 27 Feb 2014 18:24:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WJ9gP-0000jy-Pd for bug-gnu-emacs@gnu.org; Thu, 27 Feb 2014 17:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Feb 2014 22:44:01 +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.13935409922760 (code B ref 13598); Thu, 27 Feb 2014 22:44:01 +0000 Original-Received: (at 13598) by debbugs.gnu.org; 27 Feb 2014 22:43:12 +0000 Original-Received: from localhost ([127.0.0.1]:43212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WJ9fb-0000iR-G3 for submit@debbugs.gnu.org; Thu, 27 Feb 2014 17:43:12 -0500 Original-Received: from fencepost.gnu.org ([208.118.235.10]:47074) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WJ9fZ-0000iJ-8Y for 13598@debbugs.gnu.org; Thu, 27 Feb 2014 17:43:09 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1WJ9fY-0005Qv-FM; Thu, 27 Feb 2014 17:43:08 -0500 X-Spook: Montenegro president offensive information warfare Steve X-Ran: S(tl+:6>C&s'}6kHc$AgBa4}cJ8;XGvc@4W-}RmiT*e#ub9I.:Y`5jcTi$%mOhvAok""_: X-Hue: red X-Attribution: GM In-Reply-To: <2DC22385-AACB-4B7D-9918-3EB835B8526C@gmail.com> (Blazej Adamczyk's message of "Wed, 26 Feb 2014 17:54:06 +0100") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) 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:86335 Archived-At: 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 = start-line > *(message-header CRLF) > CRLF > [ message-body ] > start-line = 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.