I posted this on Tom Eyckmans’ blog 
(http://blog.iadvise.eu/2015/01/12/http2-server-push/ 
<http://blog.iadvise.eu/2015/01/12/http2-server-push/>), but I figure this is a 
better place for the discussion since there seems to be a problem with the push 
mechanism itself…

First of all Tom, great work on making this example. I tried creating a similar 
jetty push example and failed miserably :) I hate to break it to you, but the 
http2-push site is pushing a different url from the requested one so the pushes 
are wasted. Hitting the url
        https://localhost:8443/blog-http2-push/push?push=true&rows=0&columns=1
(I had to look at the source to determine the ?push=true was required for push)

If you look in the Chrome (Canary build 42) chrome://net-internals/#events 
screen and find your SPDY_SESSION you can see that the push promise has a url of

        
/blog-http2-push/blog-http2-push/images/slice_0_0.jpg?push=true&rows=0&columns=1

where as the url requested in the page is just

        /blog-http2-push/images/slice_0_0.jpg

So there are 2 problems there … the pushed url path has an extra 
blog-http2-push in it and the pushed url has the querystring in it.

I tried fixing the servlet code but not calling the absoluteResourcePath method 
and by setting the query tring to null.
        pushBuilder.setQueryString(null);
And then I could see the SPDY_STREAM_ADOPTED_PUSH_STREAM events happening in 
Chrome, but there was some sort of timeout and the client closes the streams 
and the pushed resources were not loaded at all. 

Here is what I see in the debug log

2015-01-18 10:11:58.898:DBUG:oejhs.HttpChannelOverHTTP2:         
qtp565760380-27: HTTP2 PUSH Request #240/798f5a73:
GET https://localhost:8443/blog-http2-push/images/slice_5_19.jpg HTTP/2
accept: 
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
accept-encoding: gzip, deflate, sdch
accept-language: en-US,en;q=0.8
cache-control: public, max-age=777
pragma: no-cache
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 
(KHTML, like Gecko) Chrome/42.0.2278.0 Safari/537.36
referer: https://localhost:8443/blog-http2-push/push 
<https://localhost:8443/blog-http2-push/push>
….
2015-01-18 10:11:58.899:DBUG:oejhs.HttpChannelOverHTTP2:         
qtp565760380-27: HTTP2 Commit Response #1/798f5a73:
HTTP/2 200 null
Server: Jetty(9.3.0-SNAPSHOT)
Content-Type: text/html;charset=iso-8859-1
2015-01-18 10:11:58.899:DBUG:oejhs.HttpTransportOverHTTP2:       
qtp565760380-27: HTTP2 Response #1:
HTTP/2 200
Server: Jetty(9.3.0-SNAPSHOT)
Content-Type: text/html;charset=iso-8859-1
….
2015-01-18 10:11:58.900:DBUG:oejhs.HttpTransportOverHTTP2:       
qtp565760380-27: HTTP2 Response #1 committed
…
15 seconds later
...
2015-01-18 10:12:13.801:DBUG:oeji.IdleTimeout:              
Scheduler-1530388690: 
HTTP2Stream@48dd8f83{id=2,sendWindow=10485760,recvWindow=65535,reset=false,REMOTELY_CLOSED}
 idle timeout check, elapsed: 15004 ms, remaining: -4 ms
2015-01-18 10:12:13.801:DBUG:oeji.IdleTimeout:              
Scheduler-1530388690: 
HTTP2Stream@48dd8f83{id=2,sendWindow=10485760,recvWindow=65535,reset=false,REMOTELY_CLOSED}
 idle timeout expired
2015-01-18 10:12:13.801:DBUG:oejh.HTTP2Stream:              
Scheduler-1530388690: Idle timeout 15000ms expired on 
HTTP2Stream@48dd8f83{id=2,sendWindow=10485760,recvWindow=65535,reset=false,REMOTELY_CLOSED}
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to