Created
March 18, 2012 15:18
-
-
Save axiak/2075230 to your computer and use it in GitHub Desktop.
Fixes invalid newline usage for HTTP responses in arc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /a/srv.arc 2009-06-29 12:54:11.000000000 -0400 | |
+++ /b/srv.arc 2012-03-18 10:50:17.903238925 -0400 | |
@@ -134,11 +134,11 @@ | |
(if srv-noisy* (pr c)) | |
(-- n) | |
(push c line)) | |
- (if srv-noisy* (pr "\n\n")) | |
+ (if srv-noisy* (pr "\r\n\r\n")) | |
(respond o op (+ (parseargs (string (rev line))) args) cooks ip)))) | |
-(= header* "HTTP/1.1 200 OK | |
-Content-Type: text/html; charset=utf-8 | |
+(= header* "HTTP/1.1 200 OK\r | |
+Content-Type: text/html; charset=utf-8\r | |
Connection: close") | |
(= type-header* (table)) | |
@@ -147,7 +147,7 @@ | |
(+ "HTTP/1.0 200 OK | |
Content-Type: " | |
ctype | |
- " | |
+ "\r | |
Connection: close")) | |
(map (fn ((k v)) (= (type-header* k) (gen-type-header v))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment