Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
michael@0 | 1 | function handleRequest(request, response) |
michael@0 | 2 | { |
michael@0 | 3 | response.setStatusLine(request.httpVersion, 200, "OK"); |
michael@0 | 4 | response.setHeader("Content-type", "image/bitmap"); |
michael@0 | 5 | |
michael@0 | 6 | let bmpheader = "\x42\x4D\x36\x10\x0E\x00\x00\x00\x00\x00\x36\x00\x00\x00\x28\x00\x00\x00\x80\x02\x00\x00\xE0\x01\x00\x00\x01\x00\x18\x00\x00\x00\x00\x00\x00\x10\x0E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; |
michael@0 | 7 | let bmpdatapiece = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; |
michael@0 | 8 | |
michael@0 | 9 | response.bodyOutputStream.write(bmpheader, 54); |
michael@0 | 10 | // Fill 640*480*3 nulls |
michael@0 | 11 | for (let i = 0; i < (640 * 480 * 3) / 64; ++i) |
michael@0 | 12 | response.bodyOutputStream.write(bmpdatapiece, 64); |
michael@0 | 13 | } |