Roxen.git/
server/
protocols/
http.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2000-01-16
2000-01-16 23:20:34 by Henrik Grubbström (Grubba) <grubba@grubba.org>
49c07e5d477135ca7103ba26ccf4dc13fa7afc7c (
9
lines) (+
6
/-
3
)
[
Show
|
Annotate
]
Branch:
5.2
Somewhat improved handling of keep-alive.
Rev: server/protocols/http.pike:1.186
2:
// Modified by Francesco Chemolli to add throttling capabilities. // Copyright © 1996 - 2000, Idonex AB.
-
constant cvs_version = "$Id: http.pike,v 1.
185
2000/01/
12
22
:
02
:
19
grubba Exp $";
+
constant cvs_version = "$Id: http.pike,v 1.
186
2000/01/
16
23
:
20
:
34
grubba Exp $";
#define MAGIC_ERROR
843:
#endif #ifdef KEEP_ALIVE
-
if(keepit &&
-
(
!
(
file->raw
|| file->len <= 0))
+
if(keepit && !file->raw
&& (misc->connection == "keep-alive" || (prot == "HTTP/1.1" && misc->connection != "close")) && my_fd)
1496:
if(file->len > -1) head_string += "Content-Length: "+ file->len +"\r\n";
+
else
+
misc->connection = "close";
+
head_string += "\r\n"; if(conf) conf->hsent += strlen(head_string);