HTTP/2 conforming tests with h2spec ?

82 views
Skip to first unread message

George Liu

unread,
Mar 26, 2015, 12:29:55 PM3/26/15
to openlitespee...@googlegroups.com
Might want to test OpenLiteSpeed and LiteSpeed Enterprise 5.x RC's HTTP/2 implementation against h2spec conforming test tool https://github.com/summerwind/h2spec

Right now OLS fails 44 out of 66 tests while LiteSpeed Enterprise 5.x fails 41 out of 66 tests from h2spec runs

David

unread,
Mar 26, 2015, 1:09:26 PM3/26/15
to openlitespee...@googlegroups.com
Thanks a lot George, We will test our product with this tool and do further coding about the Http2.
~David

On 3/26/2015 12:29 PM, George Liu wrote:
Might want to test OpenLiteSpeed and LiteSpeed Enterprise 5.x RC's HTTP/2 implementation against h2spec conforming test tool https://github.com/summerwind/h2spec

Right now OLS fails 44 out of 66 tests while LiteSpeed Enterprise 5.x fails 41 out of 66 tests from h2spec runs
--
You received this message because you are subscribed to the Google Groups "OpenLiteSpeed Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlitespeed-deve...@googlegroups.com.
To post to this group, send email to openlitespee...@googlegroups.com.
Visit this group at http://groups.google.com/group/openlitespeed-development.
For more options, visit https://groups.google.com/d/optout.

George Wang

unread,
Apr 2, 2015, 4:29:06 PM4/2/15
to openlitespee...@googlegroups.com
Hi George,

Thanks for the heads up on the h2spec tool.

We fixed all failed test cases for both OpenLiteSpeed and LiteSpeed
Enterprise 5.0RC3. Most of those failures are due to relaxation of our
HTTP/2 implementation, but it does help us locating a bug that wont be
triggered normally. Now, our implementation is better conforming to the
HTTP/2 spec. very nice.

Thanks,
George Wang

On 3/26/2015 12:29 PM, George Liu wrote:
> --
> You received this message because you are subscribed to the Google
> Groups "OpenLiteSpeed Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openlitespeed-deve...@googlegroups.com
> <mailto:openlitespeed-deve...@googlegroups.com>.
> To post to this group, send email to
> openlitespee...@googlegroups.com
> <mailto:openlitespee...@googlegroups.com>.

George Liu

unread,
Apr 2, 2015, 6:06:40 PM4/2/15
to openlitespee...@googlegroups.com
Excellent news ! I don't see any commit updates at https://github.com/litespeedtech/openlitespeed so I guess you only fixed OLS locally and have yet to push the updates out to https://github.com/litespeedtech/openlitespeed ?

What's usual release schedule for OLS 1.4.x branch ?

George

David

unread,
Apr 3, 2015, 9:19:32 AM4/3/15
to openlitespee...@googlegroups.com
We probably will release it today.
Thanks.
David
--
You received this message because you are subscribed to the Google Groups "OpenLiteSpeed Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlitespeed-deve...@googlegroups.com.
To post to this group, send email to openlitespee...@googlegroups.com.

George Liu

unread,
Apr 3, 2015, 4:38:14 PM4/3/15
to openlitespee...@googlegroups.com
Thanks updated my test site to OLS 1.4.7 https://h2ohttp2.centminmod.com:8099/flags.html :)

George Liu

unread,
Apr 3, 2015, 4:56:52 PM4/3/15
to openlitespee...@googlegroups.com
nicely done on OLS 1.4.7 now passes 65 out o 66 h2spec tests


66 tests, 65 passed, 0 skipped, 1 failed

===============================================================================
Failed tests
===============================================================================

  6.9. WINDOW_UPDATE
    6.9.1. The Flow Control Window
      × Sends multiple WINDOW_UPDATE frames on a stream increasing the flow control window to above 2^31-1
        - The endpoint MUST sends a RST_STREAM with the error code of FLOW_CONTROL_ERROR code.
          Expected: RST_STREAM frame (ErrorCode: FLOW_CONTROL_ERROR)
            Actual: RST_STREAM frame (ErrorCode: STREAM_CLOSED)

George Wang

unread,
Apr 3, 2015, 5:05:34 PM4/3/15
to openlitespee...@googlegroups.com
That's because LiteSpeed finish serving the static index.html closed the
stream before receiving the WINDOW_UPDATE frame. You can rename
index.html to index.php, then the test will pass as PHP page take a
little longer to process.

Best regards,
George Wang
> --
> You received this message because you are subscribed to the Google
> Groups "OpenLiteSpeed Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openlitespeed-deve...@googlegroups.com
> <mailto:openlitespeed-deve...@googlegroups.com>.
> To post to this group, send email to
> openlitespee...@googlegroups.com
> <mailto:openlitespee...@googlegroups.com>.

George Wang

unread,
Apr 3, 2015, 5:10:09 PM4/3/15
to openlitespee...@googlegroups.com
Looks like static files (html, css) are going through the dynamic gzip
compression filter for each request, not serving from our static gzip
cache, which makes the result worse. we are looking into this issue.

Best regards,
George Wang
> --
> You received this message because you are subscribed to the Google
> Groups "OpenLiteSpeed Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openlitespeed-deve...@googlegroups.com
> <mailto:openlitespeed-deve...@googlegroups.com>.
> To post to this group, send email to
> openlitespee...@googlegroups.com
> <mailto:openlitespee...@googlegroups.com>.

George Liu

unread,
Apr 3, 2015, 5:14:11 PM4/3/15
to openlitespee...@googlegroups.com
thanks it's normal and expected for .html files ?

George Liu

unread,
Apr 3, 2015, 5:17:35 PM4/3/15
to openlitespee...@googlegroups.com
I changed my OLS use from nobody user/group to nginx so could that be the problem ? as /tmp/lshttpd/swap directories are still nobody owned

If you change default OLS user, should OLS automatically change /usr/local/lsws/* dependent directories/files if needed from nobody ?

George Liu

unread,
Apr 3, 2015, 5:21:21 PM4/3/15
to openlitespee...@googlegroups.com
or i can just set a custom gzip static directory owned by nginx for OLS right ?

George Wang

unread,
Apr 3, 2015, 5:28:38 PM4/3/15
to openlitespee...@googlegroups.com
Yeah, you can try that, if it was a directory permission issue, doing
that should take care of it.

Best regards,
George Wang

George Liu

unread,
Apr 3, 2015, 5:38:33 PM4/3/15
to openlitespee...@googlegroups.com
i tried that unfortunately every few accesses/page reloads it breaks the formatting of my flags.html page and nothing is located in any of the subdirectories for the custom path

ls -lahR /home/nginx/gzipstaticols
/home/nginx/gzipstaticols:
total 48K
drwx------ 12 nginx nginx 4.0K Apr  3 21:25 .
drwx------  5 nginx nginx 4.0K Apr  3 21:19 ..
drwx------  3 nginx nginx 4.0K Apr  3 21:22 1
drwx------  3 nginx nginx 4.0K Apr  3 21:25 3
drwx------  3 nginx nginx 4.0K Apr  3 21:25 4
drwx------  3 nginx nginx 4.0K Apr  3 21:25 5
drwx------  3 nginx nginx 4.0K Apr  3 21:25 6
drwx------  3 nginx nginx 4.0K Apr  3 21:25 8
drwx------  3 nginx nginx 4.0K Apr  3 21:25 9
drwx------  4 nginx nginx 4.0K Apr  3 21:25 b
drwx------  4 nginx nginx 4.0K Apr  3 21:25 c
drwx------  3 nginx nginx 4.0K Apr  3 21:25 e

/home/nginx/gzipstaticols/1:
total 12K
drwx------  3 nginx nginx 4.0K Apr  3 21:22 .
drwx------ 12 nginx nginx 4.0K Apr  3 21:25 ..
drwx------  2 nginx nginx 4.0K Apr  3 21:25 3

/home/nginx/gzipstaticols/1/3:
total 8.0K
drwx------ 2 nginx nginx 4.0K Apr  3 21:25 .
drwx------ 3 nginx nginx 4.0K Apr  3 21:22 ..

George Wang

unread,
Apr 3, 2015, 5:47:18 PM4/3/15
to openlitespee...@googlegroups.com
It is a bug, please try the following patch to fix it.

diff --git src/http/staticfilecachedata.cpp src/http/staticfilecachedata.cpp
index fc408bf..0fd7676 100644
--- src/http/staticfilecachedata.cpp
+++ src/http/staticfilecachedata.cpp
@@ -634,7 +634,7 @@ int StaticFileCacheData::compressFile()
pData = m_fileData.getCacheData(offset, wanted, achBuf, len);
if (wanted <= 0)
return LS_FAIL;
- if (gzBuf.write(pData, wanted))
+ if (gzBuf.write(pData, wanted) == LS_FAIL)
return LS_FAIL;
offset += wanted;

George Wang

unread,
Apr 3, 2015, 6:04:33 PM4/3/15
to openlitespee...@googlegroups.com
For the regular HTTP test on port 8098, litespeed is using "chunked"
transfer encoding for all small images files, something is not right
that force LiteSpeed to use chunk encoding for static file with known size.

It slow us down.

George Liu

unread,
Apr 3, 2015, 6:05:17 PM4/3/15
to openlitespee...@googlegroups.com
with patch still no data in custom gzip static directory and for only https HTTP/2 version on port 8099 on reloads the page images and format break



cleared my browser cache too

George Liu

unread,
Apr 3, 2015, 6:07:40 PM4/3/15
to openlitespee...@googlegroups.com
another screen shot http://imgur.com/iVOGkjf

George Liu

unread,
Apr 3, 2015, 6:17:59 PM4/3/15
to openlitespee...@googlegroups.com
here's my server and vhost config files for you to check https://bitbucket.org/snippets/eva2000/eK8L :)

George Wang

unread,
Apr 3, 2015, 6:18:39 PM4/3/15
to openlitespee...@googlegroups.com
It should work fine without custom gzip static directory. the default
directory is /tmp/lshttpd/swap/ , see if any file get created there?

Have configured OLS to gzip compress those small image file? those file
should be served as is, should not add "image/png" to compressible type.



On 4/3/2015 6:07 PM, George Liu wrote:
> another screen shot http://imgur.com/iVOGkjf
>
> On Saturday, April 4, 2015 at 8:05:17 AM UTC+10, George Liu wrote:
>
> with patch still no data in custom gzip static directory and for
> only https HTTP/2 version on port 8099 on reloads the page images
> and format break
>
> https://h2ohttp2.centminmod.com:8099/flags.html
> <https://h2ohttp2.centminmod.com:8099/flags.html>
>
> screenshot http://imgur.com/eBe2Ovk <http://imgur.com/eBe2Ovk>

George Wang

unread,
Apr 3, 2015, 6:24:20 PM4/3/15
to openlitespee...@googlegroups.com
Please remove pagespeed module then check response header, if chunked
encoding is still used, remove the cache module. I think it is more
likely caused by pagespeed module.

Those two modules are not in use in the test anyway, better remove those.
We will try to fix the module once find out which module causes trouble.

George Liu

unread,
Apr 3, 2015, 6:30:51 PM4/3/15
to openlitespee...@googlegroups.com
the files at https://bitbucket.org/snippets/eva2000/eK8L (updated with removed gzip directory at ) is what i have configured so didn't configure to gzip images

with removed gzip static directory still same problem on OLS 1.4.7 + patch. With OLS 1.4.6 at least it worked with no gzip static directory set

I only enabled and loaded cache and pagespeed module after my flags test at https://h2ohttp2.centminmod.com:8099/webpagetests1.html 

George Liu

unread,
Apr 3, 2015, 6:36:30 PM4/3/15
to openlitespee...@googlegroups.com
FYI original flag test didn't have chunked encoding

for 8098

IP: 198.199.94.9
Error/Status Code: 200
Client Port: 55177
Request Start: 0.935 s
Time to First Byte: 314 ms
Content Download: 2 ms
Bytes In (downloaded): 1.8 KB
Bytes Out (uploaded): 0.4 KB
Request Headers:

GET /flags/round_flags/thumbs/thumb_Afghanistan_opt.png HTTP/1.1
Connection: keep-alive
Accept: image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36 PTST/204
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
Response Headers:

HTTP/1.1 200 OK
cache-control: public, max-age=604800
expires: Fri, 03 Apr 2015 03:04:05 GMT
etag: "60d-522c7fb0-c0ec5"
last-modified: Sun, 08 Sep 2013 13:46:24 GMT
content-type: image/png
content-length: 1549
accept-ranges: bytes
date: Fri, 27 Mar 2015 03:04:05 GMT
server: LiteSpeed

for 8099

Error/Status Code: 200
Request Start: 2.110 s
Time to First Byte: 316 ms
Content Download: 29 ms
Bytes In (downloaded): 1.6 KB
Bytes Out (uploaded): 0.5 KB
Request Headers:

GET /flags/round_flags/thumbs/thumb_Afghanistan_opt.png HTTP/1.1
:method: GET
:path: /flags/round_flags/thumbs/thumb_Afghanistan_opt.png
:scheme: https
accept: image/webp,*/*;q=0.8
accept-encoding: gzip, deflate, sdch
accept-language: en-US,en;q=0.8
user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36
Response Headers:

HTTP/2.0 200
accept-ranges: bytes
cache-control: public, max-age=604800
content-length: 1549
content-type: image/png
date: Fri, 27 Mar 2015 03:06:53 GMT
etag: "60d-522c7fb0-c0ec5"
expires: Fri, 03 Apr 2015 03:06:53 GMT
last-modified: Sun, 08 Sep 2013 13:46:24 GMT
server: LiteSpeed
...

George Liu

unread,
Apr 3, 2015, 6:45:00 PM4/3/15
to openlitespee...@googlegroups.com
FYI, the broken images and format at https://h2ohttp2.centminmod.com:8099/flags.html only happen if right click and reload/refresh the page in chrome 41 and opera 28

George Liu

unread,
Apr 3, 2015, 7:03:57 PM4/3/15
to openlitespee...@googlegroups.com
FYI I switched back to OLS 1.4.6 and no broken format and images on manual page reloads only in OLS 1.4.7 for port 8099 tests at https://h2ohttp2.centminmod.com:8099/flags.html
...

George Wang

unread,
Apr 3, 2015, 10:24:07 PM4/3/15
to openlitespee...@googlegroups.com
Please try patch

diff --git src/http/staticfilehandler.cpp src/http/staticfilehandler.cpp
index d0a8d78..1e4c194 100644
--- src/http/staticfilehandler.cpp
+++ src/http/staticfilehandler.cpp
@@ -544,7 +544,10 @@ int StaticFileHandler::process(HttpSession *pSession,

buildStaticFileHeaders(pResp, pReq, pData);
if (pECache == pCache->getGziped())
+ {
pResp->addGzipEncodingHeader();
+ pReq->orGzip(UPSTREAM_GZIP);
+ }
pSession->setSendFileBeginEnd(0,
pData->getECache()->getFileSize());
}
} //Xuedong Add for SSI Start

on top of previous patch, the previous patch may cause double compression.

Best regards,
George Wang

George Liu

unread,
Apr 3, 2015, 11:32:13 PM4/3/15
to openlitespee...@googlegroups.com
unfortunately still broken with 1.4.7 + the 2 patches you posted for reloads to http/2 port 8099 version only https://h2ohttp2.centminmod.com:8099/flags.html

image headsers for both HTTP/1.1 and HTTP/2.0

HTTP/1.1 and https 8099

HTTP/1.1 200 OK
cache-control: public, max-age=604800
expires: Sat, 11 Apr 2015 03:29:45 GMT
etag: "60d-522c7fb0-c0ec5"
last-modified: Sun, 08 Sep 2013 13:46:24 GMT
content-type: image/png
content-length: 1549
accept-ranges: bytes
date: Sat, 04 Apr 2015 03:29:45 GMT
server: LiteSpeed
cache-control: public, must-revalidate, proxy-revalidate

HTTP/2 and https 8099

HTTP/2.0 200
cache-control:public, max-age=604800
cache-control:public, must-revalidate, proxy-revalidate
expires:Sat, 11 Apr 2015 03:30:00 GMT
etag:"60d-522c7fb0-c0ec5"
last-modified:Sun, 08 Sep 2013 13:46:24 GMT
content-type:image/png
content-length:1549
accept-ranges:bytes
date:Sat, 04 Apr 2015 03:30:00 GMT
server:LiteSpeed

HTTP/1.1 non-https 8098

HTTP/1.1 200 OK
cache-control: public, max-age=604800
expires: Sat, 11 Apr 2015 03:31:21 GMT
etag: "60d-522c7fb0-c0ec5"
last-modified: Sun, 08 Sep 2013 13:46:24 GMT
content-type: image/png
content-length: 1549
accept-ranges: bytes
date: Sat, 04 Apr 2015 03:31:21 GMT
server: LiteSpeed
cache-control: public, must-revalidate, proxy-revalidate

George Wang

unread,
Apr 6, 2015, 4:32:36 PM4/6/15
to openlitespee...@googlegroups.com
George,

There must be add-on module enabled, as the response header has
> cache-control: public, must-revalidate, proxy-revalidate

OpenLiteSpeed wont add a header like that by itself, I suspect that it
is mod_pagespeed.

Please take out those add-on modules completely out of the
configuration, not just disabling it as it may affect something.

Best regards,
George Wang

George Liu

unread,
Apr 7, 2015, 2:25:17 AM4/7/15
to openlitespee...@googlegroups.com
the header is what i added myself as my nginx setup has those headers by default so i added them to h2o and openlitespeed so I can properly match each web server's served headers for my next comparison benchmark tests.

if nginx and h2o handle those particular headers fine, would that then be an openlitespeed bug ?

George Liu

unread,
Apr 7, 2015, 2:29:47 AM4/7/15
to openlitespee...@googlegroups.com
okay tried removing cache-control: public, must-revalidate, proxy-revalidate and still only for HTTP/2 https 8099 port does reload manually break the images and css serving

with cache-control: public, must-revalidate, proxy-revalidate non-https 8098 reloads fine it's just https 8099 with OLS 1.4.7 on reloads that is an issue with or without cache-control: public, must-revalidate, proxy-revalidate 

George Liu

unread,
Apr 7, 2015, 2:51:57 AM4/7/15
to openlitespee...@googlegroups.com
oh and OLS 1.4.6 downgrade has no problems with 8099 https manual page reloads. Only OLS 1.4.7
...

George Wang

unread,
Apr 7, 2015, 9:55:39 AM4/7/15
to openlitespee...@googlegroups.com
OK, I see.
If it is just a header added manually, it should not be the cause of the
problem.
Can you please turn on debug logging, reproduce the problem, send us the
full log file?

Thanks,
George Wang

George Liu

unread,
Apr 7, 2015, 1:20:48 PM4/7/15
to openlitespee...@googlegroups.com
Email sent to your email address (hope the email is still valid) let me know when you receive it :)

cheers

George

George Wang

unread,
Apr 7, 2015, 1:47:09 PM4/7/15
to openlitespee...@googlegroups.com
Yes, I got it.

Thanks!

David

unread,
Apr 10, 2015, 3:58:15 PM4/10/15
to George Liu, openlitespee...@googlegroups.com
Hi George,

I sync-ed my testing env with your ngx-pagespeed settings, and then I got very good testing result of
openlitespeed (http2) + modpagespeed
And now we just released 1.4.7(the previous 1.4.7 was not announced and not a final one ), you may want to upgrade it.
If you want to setup the modpagespeed, you can just use the ngx-pagespeed settings and do a little change.
Such as
pagespeed EnableFilters combine_css; ========>   pagespeed EnableFilters combine_css
(The only difference is the ;  and it is not needn't in modpagespeed)
Any questions, please contact me.

Thanks.
David


On 4/10/2015 12:16 PM, George Liu wrote:
Hi David got confused that your reply was email and not group message as couldn't find this on the google group heh.


cheers

George

On Sat, Apr 11, 2015 at 12:50 AM, David <d...@litespeedtech.com> wrote:
Hi George,

Thanks for your testing and giving us suggestions.
We fixed some bug in http2 side and also in our modpagespeend module, now we believe it is much better now. I need to do more test to release the new version.
Can you give me your nginx configuration about the pagespeed so that I can compare with our software.

Thanks again.
David

George Liu

unread,
Apr 11, 2015, 6:24:30 AM4/11/15
to openlitespee...@googlegroups.com, eva...@centminmod.com
Hi David whatever you did i latest 1.4.7 release fixed my broken page reloads for HTTP/2 port 8099 site https://h2ohttp2.centminmod.com:8099/flags.html :)

manual page refreshing seems to work and gzipstatic files seem to be saved in custom directory
Reply all
Reply to author
Forward
0 new messages