| Age | Commit message (Collapse) | Author |
|
|
|
microformats/JSON-LD/<meta> to JF2 (#80)
closes #75
This is a large squash commit. For details, see https://codeberg.org/eltrac/weepinbell/pulls/80
|
|
|
|
|
|
|
|
- print clear stack trace using timbre when capturing exceptions
- don't pass nil to url/normalize; if url/normalize gets a nil, instead
of NPE, it now returns an empty string
- capture exceptions in processor pipeline to keep it from dying
- http.downloader now checks response status instead of blindly
downloading anything
|
|
- some namespaces tests require did not get renamed
- url/extract might throw AssertionError if input contains non-HTTP(S)
urls. it should not check schemes.
- verifier doesn't need to filter non-HTTP(S) urls since they will
return false anyway, and plus it makes localhost urls in tests fail
|
|
- URISyntaxException was not caught in url/normalize, causing
normalization failure which leads to verification failure when there is
one invalid URL, even though valid URL exists
- skip non-HTTP(S) urls when verifying
|
|
utils: add url utilities for accurate comparison
- add url/normalize taht reconstructs URL, strips unnecessary
components, reorders query string and ensures determinism
- add url/url= that uses url/normalize
receiver: normalize URLs before checking and putting in queue
- use url= and normalize from utils.url
- rename verify-request to check-request to avoid confusion with
verifier.clj
verifier: check if source includes target URL more accurately
- implement url/extract with robinst/autolink-java, which extracts a
vector a URLs from string
- check if source includes target by
1. extracting all links from source body
2. normalizing all links before comparing with target link (with url=
func)
- refactor verify-headers -> match-content-types, with a higher order
function and clearer description
retriever, storage: use url= instead of = when comparing urls
|
|
|
|
starting from now, every commit should be cljfmt-fixed
|
|
processor: tidy up log msg and level; improve code style
- all messages start with a lower-case letter
- all webmention-related logging contains first 8-digit of its id
- use WARN level when something is deleted, not INFO
- use WARN level when exceptional cases happen, not ERROR
- get rid of emojis in log messages
utils: digest-short function for logging
verifier: tidy up log messages; improve code style
- use `cond` instead of nested `if`s
- same message format as processor's logs
webhook: tidy up log messages; send webhooks robustly
- use same logging formats as processor and verifier
- handle error, 4xx, 5xx status and log them
- move logging inside webhook module, away from core.clj
|
|
also refactored weepinbell.utils.digest. business logic no longer depend
on a concrete algorithm like SHA-256 or MD5, it's just a `digest`
function whose defaults can be replaced anytime.
|
|
used java.net to create a small validator that passes the test
refactor: rename validator to url, and move other url funcs here
|
|
use Java introp instead of cljc-md5, which is heavy on dependencies.
|