Apache HttpClient Log Parser
by Ukjin Yang
HTML
<h1>Apache HttpClient Log Parser</h1>
<textarea id="in" rows="6" cols="100" placeholder="Paste log here.">Log Example 123[0x24][0x25][0x5e]</textarea>
<pre id="out"></pre>
JavaScript
!function($in, $out, fn){
const RX = /\[0x(\w{2})\]/g, RG = (m, x) => `%${x.toUpperCase()}`
$in.addEventListener('change', fn = function(){$out.textContent = decodeURIComponent(this.value.replace(RX, RG))});
fn.call($in)
}(document.querySelector('#in'), document.querySelector('#out'))