2004-05-25
2004-05-25 18:59:06 by Martin Stjernholm <mast@lysator.liu.se>
-
0248d48096a55f6e314d8c26bdc8fa573be22626
(27 lines)
(+10/-17)
[
Show
| Annotate
]
Branch: 5.2
Activate the cache key in the protocol cache. Some debug stuff got
moved to RequestID in prototypes.pike.
Rev: server/protocols/http.pike:1.450
2:
// Modified by Francesco Chemolli to add throttling capabilities.
// Copyright © 1996 - 2001, Roxen IS.
- constant cvs_version = "$Id: http.pike,v 1.449 2004/05/19 13:05:38 grubba Exp $";
+ constant cvs_version = "$Id: http.pike,v 1.450 2004/05/25 18:59:06 mast Exp $";
// #define REQUEST_DEBUG
#define MAGIC_ERROR
22:
int req_time = HRTIME();
#endif
- #ifdef ID_OBJ_DEBUG
- RoxenDebug.ObjectMarker __marker = RoxenDebug.ObjectMarker (this_object());
- #endif
-
+
#ifdef REQUEST_DEBUG
int footime, bartime;
#define REQUEST_WERR(X) do {bartime = gethrtime()-footime; werror("%s (%d)\n", (X), bartime);footime=gethrtime();} while (0)
1774:
}
else
if(!file->type) file->type="text/plain";
+
#if 0
REQUEST_WERR(sprintf("HTTP: Sending result for prot:%O, method:%O, file:%O",
prot, method, file));
1790: Inside #if defined(RAM_CACHE)
if( file->len>0 && // known length.
((file->len + strlen( head_string )) <
conf->datacache->max_file_size)
+ // vvv Relying on the interpreter lock from here.
&& misc->cachekey )
{
-
+ misc->cachekey->activate();
+ // ^^^ Relying on the interpreter lock to here.
string data = "";
if( file->file ) data += file->file->read();
if( file->data ) data += file->data;
1868:
send(head_string);
file->len = 1; // Keep those alive, please...
}
+
TIMER_END(send_result);
start_sender();
}
2408:
}
}
- string _sprintf( )
- {
- return "RequestID(" + (raw_url||"") + ")"
- #ifdef ID_OBJ_DEBUG
- + (__marker ? "[" + __marker->count + "]" : "")
- #endif
- ;
- }
-
+
Stdio.File connection( )
{
return my_fd;