summaryrefslogtreecommitdiff
path: root/caddyconfig/caddyfile/lexer_test.go
AgeCommit message (Collapse)Author
2023-02-26caddyfile: Fix heredoc fuzz crasher, drop trailing newline (#5404)Francis Lavoie
Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com>
2023-02-26caddyfile: Implement heredoc support (#5385)Francis Lavoie
2022-04-21Make file modes consistentMatthew Holt
No need to have executable bit on .go or .txt files
2021-09-16Make copyright notice more consistentMatthew Holt
Some files had the old copyright or were missing the license comment entirely. Also change Light Code Labs to Dyanim in security contact and releases.
2020-07-20caddyfile: Export Tokenize function for lexing (#3549)Francis Lavoie
2020-05-05caddyconfig: Don't start comments in middle of tokens (#3267)Francis Lavoie
* caddyconfig: Only parse # as start of comment if preceded by space * caddyconfig: Simplify # logic using len(val), add a test
2020-05-05caddyfile: Support backticks as quotes (closes #2591) (#3242)Matt Holt
2019-10-15v2: Make tests work on Windows (#2782)Matt Holt
* file_server: Make tests work on Windows * caddyfile: Fix escaping when character is not escapable We only escape certain characters depending on inside or outside of quotes (mainly newlines and quotes). We don't want everyone to have to escape Windows file paths like C:\\Windows\\... but we can't drop the \ either if it's just C:\Windows\...
2019-09-28caddyfile: Fix lexer behavior with regards to escaped newlinesMatthew Holt
Newlines (\n) can be escaped outside of quoted areas and the newline will be treated as whitespace but not as an actual line break. Escaping newlines inside a quoted area is not necessary, and because quotes trigger literal interpretation of the contents, the escaping backslash will be parsed as a literal backslash, and the newline will not be escaped. Caveat: When a newline is escaped, tokens after it until an unescaped newline will appear to the parser be on the same line as the initial token after the last unescaped newline. This may technically lead to some false line numbers if errors are given, but escaped newlines are counted so that the next token after an unescaped newline is correct. See #2766
2019-08-09Implement config adapters and beginning of Caddyfile adapterMatthew Holt
Along with several other changes, such as renaming caddyhttp.ServerRoute to caddyhttp.Route, exporting some types that were not exported before, and tweaking the caddytls TLS values to be more consistent. Notably, we also now disable automatic cert management for names which already have a cert (manually) loaded into the cache. These names no longer need to be specified in the "skip_certificates" field of the automatic HTTPS config, because they will be skipped automatically.