Page MenuHomeFreeBSD

www/h2o: update to 2.2.4
ClosedPublic

Authored by dch on Nov 14 2017, 12:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 14 2024, 1:50 PM
Unknown Object (File)
Feb 14 2024, 1:49 PM
Unknown Object (File)
Feb 14 2024, 1:49 PM
Unknown Object (File)
Feb 14 2024, 1:49 PM
Unknown Object (File)
Feb 14 2024, 1:46 PM
Unknown Object (File)
Feb 14 2024, 1:46 PM
Unknown Object (File)
Feb 14 2024, 1:46 PM
Unknown Object (File)
Feb 14 2024, 1:46 PM
Subscribers

Details

Summary
  • includes websocket fix and bonus improved docs

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I don't see how/where this patch is being applied?

dch retitled this revision from www/h2o: fix incorrect headers during websocket upgrade pull in patch from master branch in github to www/h2o: fix incorrect headers during websocket upgrade.
dch edited the summary of this revision. (Show Details)

Supply svn ports diff this time and not the upstream git patch

The actual bug is that the header ends up with an incorrect field:

"upgrade: websockets, websockets" which breaks some but not all
ws clients.

FWIW here's how I tested it:

  • get websocketd.com (my next port)
websocketd --devconsole --port 1080 sh -c "while true; do fortune; sleep 1; done"

run h2o to proxy this connection back to a browser

yaml
# /usr/local/etc/h2o/h2o.conf
#ee https://h2o.examp1e.net/ for detailed documentation
user: www
pid-file: /var/run/h2o.pid
access-log: /var/log/h2o/h2o-access.log
error-log: /var/log/h2o/h2o-error.log
listen: 80
hosts:
  localhost:
    paths:
      "/ok.json":
        mruby.handler: |
          Proc.new do |env|
            [200, {'content-type' => 'application/json'}, ['{"status":"ok"}']]
          end
      "/":
        proxy.websocket: ON
        proxy.reverse.url: "http://localhost:1080/"

Lgtm. Merge quarterly? Did you want to update your maintainer address to dch@FreeBSD.org?

This revision is now accepted and ready to land.Nov 17 2017, 2:15 AM

update my maintainer @ and refine licence for mruby components

This revision now requires review to proceed.Dec 1 2017, 11:20 AM

provide more examples and a decent secure-by-default config

www/h2o/files/h2o.conf.sample
16 ↗(On Diff #36042)

h2o.conf.sample.in and %%ETCDIR%% ?

63 ↗(On Diff #36042)

%%PREFIX%%

update sample to get best possible security scores on ssllabs.com and securityheaders.io

www/h2o/files/h2o.conf.sample
18 ↗(On Diff #36043)

h2o.conf.sample.in and %%ETCDIR%% ?

67 ↗(On Diff #36043)

Sorry, meant to write %%ETCDIR%% here as well.

73 ↗(On Diff #36043)

/usr/local -> %%PREFIX%% ?

we released 2.2.4 so the websocket fix is now shipped. this update contains
the improved sample config file as a bonus.

dch retitled this revision from www/h2o: fix incorrect headers during websocket upgrade to www/h2o: update to 2.2.4.Dec 15 2017, 4:46 PM
dch edited the summary of this revision. (Show Details)

Not specific to this review, but I think it is safe to replace share/h2o with %%DATADIR%% in pkg-plist. You test by redefining DATADIR. Your call.
Also, cmake reports

-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
...
-- Found LIBUV: /usr/local/lib/libuv.so                                                                                                                                                       
-- libuv found but ignored; is too old                                                                                                                                                        
-- Could NOT find WSLAY (missing: WSLAY_LIBRARIES WSLAY_INCLUDE_DIR)

Cause for concern?

dch accepted this revision.EditedDec 16 2017, 12:06 AM
In D13077#282341, @jrm wrote:

wrt pkgconfig, h2o falls back to a more primitive detection without it
but it works with pkgconfig now so lets use that.

Not specific to this review, but I think it is safe to replace share/h2o with %%DATADIR%% in pkg-plist. You test by redefining DATADIR. Your call.

works fine - thanks

Also, cmake reports

-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
...
-- Found LIBUV: /usr/local/lib/libuv.so                                                                                                                                                       
-- libuv found but ignored; is too old                                                                                                                                                        
-- Could NOT find WSLAY (missing: WSLAY_LIBRARIES WSLAY_INCLUDE_DIR)

Cause for concern?

No, but its a bit odd.

libuv isn't used since a while, see http://blog.kazuhooku.com/2014/09/the-reasons-why-i-stopped-using-libuv.html
wslay is allegedly needed for websocket proxy but is demonstrably not needed in practice.

I've asked upstream what is up with these, and we'll resolve them in the next release.

This revision is now accepted and ready to land.Dec 16 2017, 12:06 AM
This revision was automatically updated to reflect the committed changes.