зеркало из https://github.com/mozilla/gecko-dev.git
Bug 370245 - Make the HTTP server asynchronously process requests, and pave the way for future improvements to processing. r=biesi, a=bsmedberg on a testing-only change
This commit is contained in:
Родитель
0c716b03a2
Коммит
83ffd0f377
|
@ -78,6 +78,10 @@ calling server.stop() before the host application closes to ensure that all
|
|||
requests have completed. Things probably aren't going to break too horribly if
|
||||
you don't do this, but better safe than sorry.
|
||||
|
||||
MozJSHTTP makes no effort to time out requests, beyond any the socket itself
|
||||
might or might not provide. I don't believe it provides any by default, but
|
||||
I haven't verified this.
|
||||
|
||||
To be clear: the guarantee that nsIHttpServer.stop says implementations should
|
||||
make when possible (that .stop returns only when all pending requests have been
|
||||
serviced) cannot be made in a 1.8 environment; it can be made in a 1.9
|
||||
|
|
|
@ -5,11 +5,6 @@ Bugs to fix:
|
|||
a performance standpoint?)
|
||||
|
||||
Ideas for future improvements:
|
||||
- mod_cern_meta or Apache asis functionality (probably the former, since
|
||||
asis+binary files looks annoying but is a definite want, and line endings are
|
||||
likely a pain):
|
||||
<http://httpd.apache.org/docs/2.0/mod/mod_cern_meta.html> and
|
||||
<http://httpd.apache.org/docs/2.0/mod/mod_asis.html>
|
||||
- add API to disable response buffering which, when called, causes errors when
|
||||
you try to do anything other than write to the body stream (i.e., modify
|
||||
headers or status line) once you've written anything to it -- useful when
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -272,13 +272,13 @@ interface nsIHttpRequestMetadata : nsIPropertyBag
|
|||
boolean hasHeader(in string fieldName);
|
||||
|
||||
/**
|
||||
* An nsISimpleEnumerator over the names of the headers in this request. The
|
||||
* header field names in the enumerator may not necessarily have the same case
|
||||
* as they do in the request itself.
|
||||
* An nsISimpleEnumerator of nsISupportsStrings over the names of the headers
|
||||
* in this request. The header field names in the enumerator may not
|
||||
* necessarily have the same case as they do in the request itself.
|
||||
*/
|
||||
readonly attribute nsISimpleEnumerator headers;
|
||||
|
||||
// XXX should expose body of request here!
|
||||
// XXX expose request body here!
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -41,11 +41,6 @@ do_import_script("netwerk/test/httpserver/httpd.js");
|
|||
// if these tests fail, we'll want the debug output
|
||||
DEBUG = true;
|
||||
|
||||
// XPCOM constructor shorthands
|
||||
const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1",
|
||||
"nsIBinaryInputStream",
|
||||
"setInputStream");
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new nsHttpServer instance. This function is intended to
|
||||
|
|
|
@ -21,10 +21,6 @@ var test_array = [
|
|||
|
||||
// Utility functions
|
||||
|
||||
var BinaryInputStream =
|
||||
Components.Constructor("@mozilla.org/binaryinputstream;1",
|
||||
"nsIBinaryInputStream", "setInputStream");
|
||||
|
||||
function makeChan(url) {
|
||||
var ios = Cc["@mozilla.org/network/io-service;1"]
|
||||
.getService(Ci.nsIIOService);
|
||||
|
|
Загрузка…
Ссылка в новой задаче