Introduces variable `override-annotations`. If set to `t`, annotating a word
twice will not throw an error, but reset the word and apply the new annotation.
The new word `reset-all` is provided as convenience to reset all known
annotations.
assocs.extras: Combinator for merging two assocs, rename assoc-merge
Renamed `assoc-merge` to `assoc-collect`, and introduced `assoc-merge` as
combinator to combine two assocs, specifying a quotation in case there is a
value for a certain key in both. `assoc-collapse` is the reducing version.
- does not handle typos
- not html5 compliant (that is a larger project, see html5 branch)
- meant to use with chloe templates when i figure out the template compiler works
crypto.jwt: Add a library to encode/decode jwt web tokens.
https://tools.ietf.org/html/rfc7519
online tester at https://jwt.io/#debugger
- we don't have a way to minify json (remove spaces from the final payload)
- had to add a word in base64 that urlencodes and removes trailing = signs
- only sha-256 is supported
base64: Add a version of url-base64 that trims trailing === for jwt.
See https://tools.ietf.org/html/rfc7519
and
https://stackoverflow.com/questions/49082844/how-could-firebase-send-a-jwt-token-which-payload-contains-an-underscore-charact
David Mindlin [Sun, 4 Apr 2021 04:29:12 +0000 (21:29 -0700)]
HPack for HTTP/2 (#2447)
* created framework for hpack
* Started working on decoding hpack.
* Creating helper words for hpack decoding.
* Continued work on hpack, finished static table.
* Small updates to hpack
* Some rearranging and implementing string and integer decoding.
* Refactored the integer method, and added some of the gluing together
code for decoding hpack.
* Added some tests for the string and integer decoding of hpack.
* Added some more tests for hpack decoding
* Added dynamic-table managment to hpack decoding.
* Added some errors for hpack decoding
* Added an additional test from the rfc for hpack decoding.
* ain function for hpack encode, trying to make similar to decode
* Quick fix to hpack-decode and clean up for the test file.
* Compilation changes
* Changed to use utf 8 decoding for strings in hpack decoding.
* Renamed decode-context to hpack-context, and moved all the definitions
to one place.
* removed unnecessary function
* Created hpack string and integer encoding.
Also minor optimization to integer decoding.
* Updated default hpack dynamic table max size.
* Fixed off by 1 error in indexing, and changed the output object to an
array.
* Added some large tests for the hpack-decode word.
* Small refactoring of hpack decode-string.
* working on encode
* changed encode stack effect
* Minor update to hpack integer encoding for consistent output data
structure
* Added tests for hpack encoding, including integers, strings, individual
fields, and entire header block sequences.
Integers and strings checks the outputed byte array
individual fields and header lists checks by decoding and ensuring the
same result out, and checking that the contexts (dynamic tables) are the
same.
Individual fields also check that the entire block is consumed.
* main encode function
* table searching
* Some minor rewrites for better style in hpack code.
* Some more code edits for style to hpack context handling.
* Added huffman compression decoding for strings in hpack.
The implementation may not be the fastest, but it works.
* Implemented huffman encoding for hpack strings
* working on encode
* completed hpack encode
* Some improvements to hpack huffman decoding for style and performance
improvements.
* Cleaned up hpack encoding and decoding.
* Added new version of decoding an hpack encoded integer.
* Minor changes to decoding huffman encoded strings so the file compiles
correctly on first load.
* Minor change to hpack huffman compression.
* Added some light documentation for the hpack vocabulary.
Co-authored-by: David Flores <dflores0818@gmail.com>
ui.gadgets.editors: remove readline bindings by default.
There were too many conflicts and I want to keep our previous behavior
until we sort it out. Readline bindings can now be configured per
editor-class by calling "readline-bindings".
Some major changes include on macOS we pass M+ for Command and A+ for
Option, which matches some of the documentation, but now requires us to
have some OS-specific code in the define-command-map usage.
Doug Coleman [Tue, 23 Mar 2021 21:51:21 +0000 (14:51 -0700)]
ui.backend.gtk: Trim null bytes for linux copy.
check-string errors if there are any null bytes, but linux will
append \0\0\0\0\0\0 to some long strings from the factor ui
trim them and it copies without loss off data.