Erlang/OTP Forums

Author Message

<  Erlang patches mailing list  ~  Inets 3.0.1 and 3.0.3 bug

earlyriser at mac.com
Posted: Wed Apr 16, 2003 2:41 pm Reply with quote
Guest
The following esi callback generates broken HTTP

test1(Env, []) ->
io:format("Env:~p~n",[Env]),
["<html>",
"<head>",
"<title>Test1</title>",
"</head>",
"<body>",
"<h1>Erlang Body</h1>",
"<h2>Stuff</h2>",
"</body>",
"</html>"].

The problem is that inets does not add the empty line at the end of the
headers. The following patch fixes this case, though I haven't run any
other regression tests.

Interestingly the only browser I found which actually still managed to
load the page was IE on Windows. I can't imagine what algorithm they
used to figure this out..

--- httpd_response.erl.orig Mon Apr 14 18:41:28 2003
+++ httpd_response.erl Wed Apr 16 15:38:44 2003
_at__at_ -415,7 +415,7 _at__at_
{ok, Body} ->
Header =
httpd_util:header(StatusCode,Info#mod.connection) ++
- "Content-Length:" ++ content_length(Body),
+ "Content-Length:" ++ content_length(Body) ++"
",
httpd_socket:deliver(Type, Sock, [Header, Response]);

{error, Reason} ->



Post generated using Mail2Forum (http://m2f.sourceforge.net)

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum