emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/web-server 6357a1c 1/2: Fix NUL byte that confuses `gre


From: Stefan Monnier
Subject: [elpa] externals/web-server 6357a1c 1/2: Fix NUL byte that confuses `grep`s binary file detection
Date: Wed, 11 Aug 2021 02:25:15 -0400 (EDT)

branch: externals/web-server
commit 6357a1c2d1718778503f7ee0909585094117525b
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Eric Schulte <eschulte@grammatech.com>

    Fix NUL byte that confuses `grep`s binary file detection
    
    While at it, convert to lexical-binding and remove unneeded `require`.
---
 web-server-status-codes.el | 4 ++--
 web-server-test.el         | 9 ++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/web-server-status-codes.el b/web-server-status-codes.el
index f3f07fc..158b596 100644
--- a/web-server-status-codes.el
+++ b/web-server-status-codes.el
@@ -1,6 +1,6 @@
-;;; web-server-status-codes.el --- Emacs Web Server HTML status codes
+;;; web-server-status-codes.el --- Emacs Web Server HTML status codes  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2013-2014  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2021  Free Software Foundation, Inc.
 
 ;; This software is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
diff --git a/web-server-test.el b/web-server-test.el
index 5ec99b3..126726b 100644
--- a/web-server-test.el
+++ b/web-server-test.el
@@ -1,6 +1,6 @@
-;;; web-server-test.el --- Test the Emacs Web Server
+;;; web-server-test.el --- Test the Emacs Web Server  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2013-2014  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2021  Free Software Foundation, Inc.
 
 ;; Author: Eric Schulte <schulte.eric@gmail.com>
 
@@ -20,7 +20,6 @@
 ;;; Code:
 (require 'web-server)
 (require 'cl-lib)
-(eval-when-compile (require 'cl))
 (require 'ert)
 
 (defvar ws-test-port 8999)
@@ -314,9 +313,9 @@ Content-Type: application/octet-stream
    0-125, 126-64k, 64k-2^64."
   (should (string= (ws-web-socket-frame "short") "\201short"))
   (should (string= (substring (ws-web-socket-frame (make-string 126 ?a))
-                              0 5) "\201~~a"))
+                              0 5) "\201~\0~a"))
   (should (string= (substring (ws-web-socket-frame (make-string 65536 ?a))
-                              0 11) "\201a")))
+                              0 11) "\201\0\0\0\0\0\0\0a")))
 
 (ert-deftest ws/simple-chunked ()
   "Test a simple server using chunked transfer encoding."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]