Skip to content

Commit

Permalink
http/request.lua: Use new lpeg_patterns 0.5 capture format
Browse files Browse the repository at this point in the history
  • Loading branch information
daurnimator committed Jul 15, 2018
1 parent 73683bf commit d5d948b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This will automatically install run-time lua dependencies for you.
- [luaossl](http://25thandclement.com/~william/projects/luaossl.html) >= 20161208
- [basexx](https://github.com/aiq/basexx/) >= 0.2.0
- [lpeg](http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html)
- [lpeg_patterns](https://github.com/daurnimator/lpeg_patterns) >= 0.3
- [lpeg_patterns](https://github.com/daurnimator/lpeg_patterns) >= 0.5
- [fifo](https://github.com/daurnimator/fifo.lua)

To use gzip compression you need **one** of:
Expand Down
2 changes: 1 addition & 1 deletion http-scm-0.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies = {
"luaossl >= 20161208";
"basexx >= 0.2.0";
"lpeg";
"lpeg_patterns >= 0.3";
"lpeg_patterns >= 0.5";
"fifo";
}

Expand Down
2 changes: 1 addition & 1 deletion http/request.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ local request_mt = {
}

local EOF = lpeg.P(-1)
local sts_patt = lpeg.Cf(lpeg.Ct(true) * http_patts.Strict_Transport_Security, rawset) * EOF
local sts_patt = http_patts.Strict_Transport_Security * EOF
local uri_patt = uri_patts.uri * EOF
local uri_ref = uri_patts.uri_reference * EOF

Expand Down

2 comments on commit d5d948b

@leafo
Copy link
Contributor

@leafo leafo commented on d5d948b Nov 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is lpeg_patterns 0.5 incompatible with http 0.2?

I'm getting an error from the follow response header:

strict-transport-security: max-age=31556926; includeSubDomains; preload

manually updating it with http_patts.Strict_Transport_Security * EOF makes the error go away.

@daurnimator
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is lpeg_patterns 0.5 incompatible with http 0.2?

Yes. I updated the http 0.2 rockspec on luarocks.org to add the new limitation when this commit went in.

Please sign in to comment.