[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 101/119: manual application of chunked transfer encoding
From: |
Eric Schulte |
Subject: |
[elpa] 101/119: manual application of chunked transfer encoding |
Date: |
Mon, 10 Mar 2014 16:57:53 +0000 |
eschulte pushed a commit to branch master
in repository elpa.
commit 0be3f458fbec8e7349efbde06cb5980c62e77583
Author: Eric Schulte <address@hidden>
Date: Fri Jan 17 08:19:21 2014 -0700
manual application of chunked transfer encoding
---
examples/017-transfer-encoding-chunked.el | 30 +++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/examples/017-transfer-encoding-chunked.el
b/examples/017-transfer-encoding-chunked.el
new file mode 100644
index 0000000..6289e37
--- /dev/null
+++ b/examples/017-transfer-encoding-chunked.el
@@ -0,0 +1,30 @@
+;;; transfer-encoding-chunked.el -- manual chunked transfer encoding
+(ws-start
+ (lambda (request)
+ (cl-flet ((chunk (s) (format "%x\r\n%s\r\n" (string-bytes s) s)))
+ (with-slots (process headers) request
+ (ws-response-header process 200
+ '("Content-type" . "text/plain; charset=utf-8")
+ '("Transfer-Encoding" . "chunked"))
+ (let ((s "
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
+hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
+nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
+natoque penatibus et magnis dis parturient montes, nascetur
+ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam tristique
+diam non turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam
+vestibulum accumsan nisl.
+
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
+hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
+nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
+natoque penatibus et magnis dis parturient montes, nascetur
+ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam tristique
+diam non turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam
+vestibulum accumsan nisl.
+"))
+ (process-send-string process (chunk s)) (sit-for 0.5)
+ (process-send-string process (chunk s)) (sit-for 0.5)
+ (process-send-string process (chunk s)) (sit-for 0.5)
+ (process-send-string process "0\r\n\r\n")))))
+ 9017)
- [elpa] 97/119: added ws-stop-all convenience function, (continued)
- [elpa] 97/119: added ws-stop-all convenience function, Eric Schulte, 2014/03/10
- [elpa] 89/119: authorization helper, Eric Schulte, 2014/03/10
- [elpa] 92/119: simpler handler in example, Eric Schulte, 2014/03/10
- [elpa] 102/119: updated content- transfer-encoding notes, Eric Schulte, 2014/03/10
- [elpa] 103/119: set Content-length when serving files, Eric Schulte, 2014/03/10
- [elpa] 95/119: better ws-send-directory-list, Eric Schulte, 2014/03/10
- [elpa] 106/119: TODO Content and Transfer encodings, Eric Schulte, 2014/03/10
- [elpa] 104/119: tweak notes, Eric Schulte, 2014/03/10
- [elpa] 108/119: test chunked/gzipped transfer/content encodings, Eric Schulte, 2014/03/10
- [elpa] 100/119: manual application of x-gzip content encoding, Eric Schulte, 2014/03/10
- [elpa] 101/119: manual application of chunked transfer encoding,
Eric Schulte <=
- [elpa] 107/119: support for content and transfer encodings, Eric Schulte, 2014/03/10
- [elpa] 109/119: doc for new content/transfer encoding helpers, Eric Schulte, 2014/03/10
- [elpa] 110/119: automatically generate dir file w/install-info, Eric Schulte, 2014/03/10
- [elpa] 113/119: Fix WebSocket varint length encoding, Eric Schulte, 2014/03/10
- [elpa] 117/119: adding .elpaignore to keep extra file from package, Eric Schulte, 2014/03/10
- [elpa] 115/119: gnu elpa wants a "Maintainer:" pseudo-header, Eric Schulte, 2014/03/10
- [elpa] 114/119: dangerous example; web-socket comint shell buffer, Eric Schulte, 2014/03/10
- [elpa] 105/119: mention `make check' in README, Eric Schulte, 2014/03/10
- [elpa] 116/119: assign copyright to FSF, Eric Schulte, 2014/03/10
- [elpa] 111/119: Emacs packaging support with "make package", Eric Schulte, 2014/03/10