1 do_import_script("netwerk/test/httpserver/httpd.js");
5 function TestListener() {
8 TestListener
.prototype.onStartRequest = function(request
, context
) {
11 TestListener
.prototype.onStopRequest = function(request
, context
, status
) {
17 httpserv
= new nsHttpServer();
19 httpserv
.registerPathHandler("/bug412945", bug412945
);
25 Components
.classes
["@mozilla.org/network/io-service;1"].
26 getService(Components
.interfaces
.nsIIOService
).
27 newChannel("http://localhost:4444/bug412945", null, null);
29 channel
.QueryInterface(Components
.interfaces
.nsIHttpChannel
);
30 channel
.requestMethod
= "post";
31 channel
.asyncOpen(new TestListener(), null);
36 function bug412945(metadata
, response
) {
37 if (!metadata
.hasHeader("Content-Length") ||
38 metadata
.getHeader("Content-Length") != "0")
40 do_throw("Content-Length header not found!");