This is the mail archive of the ecos-bugs@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Issue 1000762] httpd.c crashes on javascript


http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000762





--- Comment #2 from Nick Garnett <nickg@ecoscentric.com>  2009-05-12 18:09:40 ---
(In reply to comment #1)
> Nick, presumably JavaScript can introduce EOF chars in the TCP stream. Does the
> (reversed) patch make sense or is this hiding a more fundamental problem?
> 

I'm not sure what this patch is trying to do. The EOF returned from getc() is
actually -1, and indicates that the remote end has closed the connection. An
EOF character, Ctrl-D, would appear as 0x04. EOF from getc() indicates that the
remote end is failing to complete the HTTP protocol request, and this patch is
just covering that up. Just breaking out of this loop seem incorrect, since the
connection is now closed, and no response can be returned.

Admittedly this code could probably be made a little more robust in the face of 
dropped connections. But I don't think this patch is the right way to do that.


-- 
Configure issuemail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the issue.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]