Roxen.git/
server/
protocols/
http.pike
Branch:
Tag:
Non-build tags
All tags
No tags
1999-10-08
1999-10-08 11:47:34 by Henrik Grubbström (Grubba) <grubba@grubba.org>
9172ca4d1c198d281538fac1c0ecbddecec289e3 (
10
lines) (+
7
/-
3
)
[
Show
|
Annotate
]
Branch:
5.2
Now works when my_fd is a simulated file.
Rev: server/protocols/http.pike:1.160
1:
// This is a roxen module. // Modified by Francesco Chemolli to add throttling capabilities. // Copyright © 1996 - 1998, Idonex AB.
-
// $Id: http.pike,v 1.
159
1999/10/
04
19
:
14
:
00
marcus
Exp $
+
// $Id: http.pike,v 1.
160
1999/10/
08
11
:
47
:
34
grubba
Exp $
#define MAGIC_ERROR #ifdef MAGIC_ERROR inherit "highlight_pike"; #endif
-
constant cvs_version = "$Id: http.pike,v 1.
159
1999/10/
04
19
:
14
:
00
marcus
Exp $";
+
constant cvs_version = "$Id: http.pike,v 1.
160
1999/10/
08
11
:
47
:
34
grubba
Exp $";
// HTTP protocol module. #include <config.h> private inherit "roxenlib";
1437:
if(!leftovers) leftovers = data||""; #endif
-
if(file->len > 0 && file->len < 2000)
+
if(
my_fd->query_fd && my_fd->query_fd() >= 0 &&
+
file->len > 0 && file->len < 2000)
{
-
+
// Ordinary connection, and a short file.
+
// Just do a blocking write().
my_fd->write((head_string || "") + (file->file?file->file->read(file->len): (file->data[..file->len-1])));