1 With IkiWiki 3.20200202.3, [[plugins/aggregate]]'s web trigger sends it's response as HTTP 200, Content-Type: text/plain, followed by a payload that seems to include a Content-type in the body accidentally, and a bunch of HTML:
4 qusp▶ GET -e "https://$redacted/ikiwiki?do=aggregate_webtrigger"
5 Enter username for Git Access at REDACTED:443: admin
9 Date: Mon, 20 Apr 2020 08:27:39 GMT
12 Content-Type: text/plain
13 Client-Date: Mon, 20 Apr 2020 08:27:39 GMT
14 Client-Peer: 31.51.75.214:443
15 Client-Response-Num: 1
16 Client-SSL-Cert-Issuer: /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
17 Client-SSL-Cert-Subject: /CN=REDACTED
18 Client-SSL-Cipher: ECDHE-RSA-CHACHA20-POLY1305
19 Client-SSL-Socket-Class: IO::Socket::SSL
21 Aggregation triggered via web.
23 Content-type: text/html
26 <html xmlns="http://www.w3.org/1999/xhtml">
30 Looking at the source it's fairly clear why:
31 <http://source.ikiwiki.branchable.com/?p=source.git;a=blob;f=IkiWiki/Plugin/aggregate.pm;hb=HEAD#l76>
33 I guess it was never intended for a human to see this output. I've found it useful to add a link button to some private pages to manually trigger the web hook,
36 <a class=feedbutton href=https://REDACTED/ikiwiki?do=aggregate_webtrigger>webtrigger</a>
38 So it would be nice if the payload was sent with a HTML content-type (which wouldn't hurt cron jobs or clients that ignore the body anyway)
40 *— [[Jon]], 2020-04-20*
42 > Oh, haha, the issue here is that the aggregation is *failing*. In the failure case, the above happens (there's an error wrapped up in HTML and delivered as text/plain).
43 > In the success case, the output to browser is just plain text.
44 > *— [[Jon]], 2020-04-20*