michael@0: Bugs to fix: michael@0: - make content-length generation not rely on .available() returning the entire michael@0: size of the body stream's contents -- some sort of wrapper (but how does that michael@0: work for the unscriptable method WriteSegments, which is good to support from michael@0: a performance standpoint?) michael@0: michael@0: Ideas for future improvements: michael@0: - add API to disable response buffering which, when called, causes errors when michael@0: you try to do anything other than write to the body stream (i.e., modify michael@0: headers or status line) once you've written anything to it -- useful when michael@0: storing the entire response in memory is unfeasible (e.g., you're testing michael@0: >4GB download characteristics) michael@0: - add an API which performs asynchronous response processing (instead of michael@0: nsIHttpRequestHandler.handle, which must construct the response before control michael@0: returns; |void asyncHandle(request, response)|) -- useful, and can it be done michael@0: in JS? michael@0: - other awesomeness?