equal
deleted
inserted
replaced
44 try { |
44 try { |
45 System.err.println ("Server: handle " + ee); |
45 System.err.println ("Server: handle " + ee); |
46 invocation++; |
46 invocation++; |
47 |
47 |
48 if (ee.serverPushAllowed()) { |
48 if (ee.serverPushAllowed()) { |
|
49 URI requestURI = ee.getRequestURI(); |
49 for (int i=0; i<loops; i++) { |
50 for (int i=0; i<loops; i++) { |
50 InputStream is = new FileInputStream(tempFile.toFile()); |
51 InputStream is = new FileInputStream(tempFile.toFile()); |
51 URI u = new URI ("http://www.foo.com/x/y/z/" + Integer.toString(i)); |
52 URI u = requestURI.resolve("/x/y/z/" + Integer.toString(i)); |
52 HttpHeadersImpl h = new HttpHeadersImpl(); |
53 HttpHeadersImpl h = new HttpHeadersImpl(); |
53 h.addHeader("X-foo", "bar"); |
54 h.addHeader("X-foo", "bar"); |
54 ee.serverPush(u, h, is); |
55 ee.serverPush(u, h, is); |
55 } |
56 } |
56 System.err.println ("Server: sent all pushes"); |
57 System.err.println ("Server: sent all pushes"); |