<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://script.quakenet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=MHTTP</id>
	<title>MHTTP - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://script.quakenet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=MHTTP"/>
	<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;action=history"/>
	<updated>2026-04-30T19:48:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6154&amp;oldid=prev</id>
		<title>Aca20031: Adding known issue about not supporting arrays in POST</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6154&amp;oldid=prev"/>
		<updated>2015-06-10T21:02:14Z</updated>

		<summary type="html">&lt;p&gt;Adding known issue about not supporting arrays in POST&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:02, 10 June 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l59&quot;&gt;Line 59:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 59:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Known issues:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Known issues:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;    Cookies do not respect attributes such as domain, path, expiration, or secure. They &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;area &lt;/del&gt;always sent&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ;    POSTing arrays is not currently supported&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;    Cookies do not respect attributes such as domain, path, expiration, or secure. They &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;are &lt;/ins&gt;always sent&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;    Relative redirects don&amp;#039;t work, only absolute&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;    Relative redirects don&amp;#039;t work, only absolute&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;    Redirects from insecure to secure links when you don&amp;#039;t have SSL will not be handled well&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;    Redirects from insecure to secure links when you don&amp;#039;t have SSL will not be handled well&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Aca20031</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6153&amp;oldid=prev</id>
		<title>Aca20031: POST, should pick it up from the external name not the internal name</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6153&amp;oldid=prev"/>
		<updated>2015-06-10T17:17:15Z</updated>

		<summary type="html">&lt;p&gt;POST, should pick it up from the external name not the internal name&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:17, 10 June 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l165&quot;&gt;Line 165:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 165:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    .hdel %inname chunkleft&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    .hdel %inname chunkleft&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Get POST binvar&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Get POST binvar&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %postBV = $http.postdata(%&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;inname&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %postBV = $http.postdata(%&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;exname&lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Use GET if there&amp;#039;s no post data, POST otherwise&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Use GET if there&amp;#039;s no post data, POST otherwise&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if ($bvar(%postBV,0) == 0) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if ($bvar(%postBV,0) == 0) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Aca20031</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6152&amp;oldid=prev</id>
		<title>Aca20031: +http.close to example</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6152&amp;oldid=prev"/>
		<updated>2015-05-22T19:46:53Z</updated>

		<summary type="html">&lt;p&gt;+http.close to example&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:46, 22 May 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l15&quot;&gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  on *:SIGNAL:http: {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  on *:SIGNAL:http: {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if ($1 == google) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if ($1 == google) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       if ($2 == SAVED) { run $3- }  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       if ($2 == SAVED) { run $3- &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| http.close $1 &lt;/ins&gt;}  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       if ($2 == PROGRESS) { echo -atg Download progress: $bytes($3).suf $+ / $+ $bytes($4).suf downloaded }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       if ($2 == PROGRESS) { echo -atg Download progress: $bytes($3).suf $+ / $+ $bytes($4).suf downloaded }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Aca20031</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6143&amp;oldid=prev</id>
		<title>Aca20031: pathIndex should be a local variable</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6143&amp;oldid=prev"/>
		<updated>2015-04-02T16:19:48Z</updated>

		<summary type="html">&lt;p&gt;pathIndex should be a local variable&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:19, 2 April 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l602&quot;&gt;Line 602:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 602:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %port&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %port&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %path&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %path&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   var %pathIndex&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %protocol&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %protocol&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %regex = /^(https?://)?([a-z.0-9\-_]+)(:\d+)?(/.*)?$/i&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %regex = /^(https?://)?([a-z.0-9\-_]+)(:\d+)?(/.*)?$/i&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Aca20031</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6141&amp;oldid=prev</id>
		<title>Jay2k1: /* Script */ bugfix in http.urlparse: local var %protocol wasn&#039;t initialized, so %protocol was set as global variable, which led to an empty %host variable if you passed an url without protocol as argument to http.urlparse, which made sockopen fail</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6141&amp;oldid=prev"/>
		<updated>2015-02-22T04:28:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Script: &lt;/span&gt; bugfix in http.urlparse: local var %protocol wasn&amp;#039;t initialized, so %protocol was set as global variable, which led to an empty %host variable if you passed an url without protocol as argument to http.urlparse, which made sockopen fail&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:28, 22 February 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l602&quot;&gt;Line 602:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 602:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %port&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %port&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %path&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %path&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   var %protocol&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %regex = /^(https?://)?([a-z.0-9\-_]+)(:\d+)?(/.*)?$/i&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %regex = /^(https?://)?([a-z.0-9\-_]+)(:\d+)?(/.*)?$/i&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if ($regex($1, %regex)) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if ($regex($1, %regex)) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jay2k1</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6140&amp;oldid=prev</id>
		<title>Aca20031: - Extra space</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6140&amp;oldid=prev"/>
		<updated>2015-02-22T01:17:18Z</updated>

		<summary type="html">&lt;p&gt;- Extra space&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:17, 22 February 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l21&quot;&gt;Line 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Script ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Script ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/del&gt;; Ben&#039;s (ben@st0rm.net) HTTP for mIRC script (mHTTP)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;; Ben&#039;s (ben@st0rm.net) HTTP for mIRC script (mHTTP)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Used to download over HTTP&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Used to download over HTTP&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Basic usage&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Basic usage&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Aca20031</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6139&amp;oldid=prev</id>
		<title>Aca20031: http.mark</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6139&amp;oldid=prev"/>
		<updated>2015-02-22T01:15:43Z</updated>

		<summary type="html">&lt;p&gt;http.mark&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:15, 22 February 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l21&quot;&gt;Line 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Script ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Script ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;; Ben&#039;s (ben@st0rm.net) HTTP for mIRC script (mHTTP)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/ins&gt;; Ben&#039;s (ben@st0rm.net) HTTP for mIRC script (mHTTP)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Used to download over HTTP&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Used to download over HTTP&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Basic usage&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Basic usage&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot;&gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; After a request completes (e.g. after a save) you can get some data:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; After a request completes (e.g. after a save) you can get some data:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;     $http.responseheader(handle, header, N) - Returns value of given responseheader, or $false. Only useful after a request is made&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;     $http.responseheader(handle, header, N) - Returns value of given responseheader, or $false. Only useful after a request is made&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ; You can mark a socket with data of your choice (it&#039;s a transparent write to a hashtable) similar to sockmark&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ; /http.mark &amp;lt;handle&amp;gt; [data] - Writes the data. Specify no data to delete the mark&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ; $http.mark(handle) - Reads the data&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Signals&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Signals&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l105&quot;&gt;Line 105:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 109:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Start socket&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Start socket&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    http.sockstart %hashtable&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    http.sockstart %hashtable&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; }&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; alias http.mark {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   var %hashtable = http. $+ $1&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   if ($isid) {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     ; As an identifier, read the mark&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     return $hget(%hashtable,mark)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   }&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   else {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     ; As a command, set the mark&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     if (!$hget(%hashtable)) {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;       echo -atg * /http.mark - No such handle $1&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     }&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     elseif (!$2) { &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;       .hdel %hashtable mark&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     }&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     else {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;       .hadd %hashtable mark $2-&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     }&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   }&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Opens socket&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Opens socket&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Aca20031</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6138&amp;oldid=prev</id>
		<title>Aca20031: + http.save to &amp;bvar</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6138&amp;oldid=prev"/>
		<updated>2015-02-22T00:44:05Z</updated>

		<summary type="html">&lt;p&gt;+ http.save to &amp;amp;bvar&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:44, 22 February 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l21&quot;&gt;Line 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Script ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Script ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/del&gt;; Ben&#039;s (ben@st0rm.net) HTTP for mIRC script (mHTTP)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;; Ben&#039;s (ben@st0rm.net) HTTP for mIRC script (mHTTP)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Used to download over HTTP&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Used to download over HTTP&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Basic usage&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Basic usage&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; /http.open [name] &amp;lt;URL&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; /http.open [name] &amp;lt;URL&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;     Opens an HTTP handle for the given URL&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;     Opens an HTTP handle for the given URL&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; /http.save [-f] &amp;lt;name&amp;gt; &amp;lt;file&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; /http.save [-f] &amp;lt;name&amp;gt; &amp;lt;file&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|bvar&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;     Downloads &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;HTTP resource to the given file&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;     Downloads &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a given &lt;/ins&gt;HTTP resource to the given file &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;or binvar&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;     -f forces the file to be overwritten&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;     -f forces the file to be overwritten&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; /http.close &amp;lt;name&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; /http.close &amp;lt;name&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;     Closes and HTTP handle for the given URL&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;     Closes and HTTP handle for the given URL&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Here are some things you can do after opening a handle, but before saving&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/downloading &lt;/del&gt;it &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;as a file&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Here are some things you can do after opening a handle, but before saving it&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Manage POST data:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ; Manage POST data:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;   /http.addpost &amp;lt;handle&amp;gt; &amp;lt;variable&amp;gt; &amp;lt;value&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ;   /http.addpost &amp;lt;handle&amp;gt; &amp;lt;variable&amp;gt; &amp;lt;value&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l78&quot;&gt;Line 78:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 78:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      return&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      return&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;file &lt;/del&gt;= $2-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;destination &lt;/ins&gt;= $2-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if ($exists(%&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;file&lt;/del&gt;)) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if ($exists(%&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;destination&lt;/ins&gt;)) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      if (%force) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      if (%force) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;        .remove %&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;file&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;        .remove %&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;destination&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      else {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      else {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l88&quot;&gt;Line 88:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 88:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ;  Open file handler stream for writing&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if (&amp;amp;* iswm %destination) { &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   &lt;/del&gt;.fopen -n %hashtable %&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;file&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     .hadd %hashtable bvarout %destination&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   &lt;/del&gt;if ($ferr) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   }&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     &lt;/del&gt;echo -atg * /http.save: Could not use file. Error: $ferr&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   else {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;return&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     &lt;/ins&gt;;  Open file handler stream for writing&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     &lt;/ins&gt;.fopen -n %hashtable %&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;destination&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     &lt;/ins&gt;if ($ferr) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;       &lt;/ins&gt;echo -atg * /http.save: Could not use file. Error: $ferr&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;       return&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     }&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     ; Store fstream name in hashtable to indicate that we want to save this once it completes&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.hadd %hashtable fstream %hashtable&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   ; Store fstream name in hashtable to indicate that we want to save this once it completes&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   .hadd %hashtable fstream %hashtable&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Set redirect counter to 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Set redirect counter to 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    .hadd %hashtable redirects 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    .hadd %hashtable redirects 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l425&quot;&gt;Line 425:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 430:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %table = http. $+ $1&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %table = http. $+ $1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if (!$hget(%table,responseheaders)) { return $false }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if (!$hget(%table,responseheaders)) { return $false }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    noop $hget(%table,responseheaders, &amp;amp;bvResponseHeaders)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    noop $hget(%table,responseheaders, &amp;amp;bvResponseHeaders&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Set up parameters for the header search&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Set up parameters for the header search&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Offset is where we start searching from in the loop&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Offset is where we start searching from in the loop&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l478&quot;&gt;Line 478:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 483:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    .hadd $1 redirects 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    .hadd $1 redirects 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    .signal HTTP $right($1,-5) COMPLETED $hget($1,responsestatus)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    .signal HTTP $right($1,-5) COMPLETED $hget($1,responsestatus)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   if ($hget($1, bvarout)) {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     noop $hget($1,body,&amp;amp;bvBody)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     var %bvarout = $ifmatch&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     bcopy %bvarout 1 &amp;amp;bvBody 1 -1&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     ; Need to use -n so that the binvar is still in scope&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     ; So we need to do this last&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     .signal -n http $right($1,-5) SAVED %bvarout&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   }&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  alias http.open {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  alias http.open {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Aca20031</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6120&amp;oldid=prev</id>
		<title>Cail: Removed an extra ).</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6120&amp;oldid=prev"/>
		<updated>2014-11-16T10:26:11Z</updated>

		<summary type="html">&lt;p&gt;Removed an extra ).&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:26, 16 November 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l425&quot;&gt;Line 425:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 425:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %table = http. $+ $1&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    var %table = http. $+ $1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if (!$hget(%table,responseheaders)) { return $false }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    if (!$hget(%table,responseheaders)) { return $false }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    noop $hget(%table,responseheaders, &amp;amp;bvResponseHeaders&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    noop $hget(%table,responseheaders, &amp;amp;bvResponseHeaders)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Set up parameters for the header search&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Set up parameters for the header search&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Offset is where we start searching from in the loop&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ; Offset is where we start searching from in the loop&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cail</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6119&amp;oldid=prev</id>
		<title>Aca20031: Created page with &quot;Often times you may want to download a web page from the internet using HTTP, but HTTP can be complicated.  This script handles most of the basics for you including * URL Pars...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=MHTTP&amp;diff=6119&amp;oldid=prev"/>
		<updated>2014-11-11T01:44:15Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Often times you may want to download a web page from the internet using HTTP, but HTTP can be complicated.  This script handles most of the basics for you including * URL Pars...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Often times you may want to download a web page from the internet using HTTP, but HTTP can be complicated.  This script handles most of the basics for you including&lt;br /&gt;
* URL Parsing&lt;br /&gt;
* SSL &lt;br /&gt;
* Cookies&lt;br /&gt;
* Sending POST data&lt;br /&gt;
* Following redirects&lt;br /&gt;
* Handling CHUNKED encoding&lt;br /&gt;
&lt;br /&gt;
Typical usage simply involves using the /http.open, save and close commands to download a file, and creating a signal event to do something with it once it is done.&lt;br /&gt;
== Example ==&lt;br /&gt;
 alias DownloadGooglesLogo {&lt;br /&gt;
  http.open google https://www.google.com/images/srpr/logo11w.png&lt;br /&gt;
  http.save -f google logo.png&lt;br /&gt;
 }&lt;br /&gt;
 on *:SIGNAL:http: {&lt;br /&gt;
   if ($1 == google) {&lt;br /&gt;
      if ($2 == SAVED) { run $3- } &lt;br /&gt;
      if ($2 == PROGRESS) { echo -atg Download progress: $bytes($3).suf $+ / $+ $bytes($4).suf downloaded }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Script ==&lt;br /&gt;
  ; Ben&amp;#039;s (ben@st0rm.net) HTTP for mIRC script (mHTTP)&lt;br /&gt;
 ; Used to download over HTTP&lt;br /&gt;
 ; Basic usage&lt;br /&gt;
 ; /http.open [name] &amp;lt;URL&amp;gt; &lt;br /&gt;
 ;     Opens an HTTP handle for the given URL&lt;br /&gt;
 ; /http.save [-f] &amp;lt;name&amp;gt; &amp;lt;file&amp;gt;&lt;br /&gt;
 ;     Downloads the HTTP resource to the given file&lt;br /&gt;
 ;     -f forces the file to be overwritten&lt;br /&gt;
 ; /http.close &amp;lt;name&amp;gt; &lt;br /&gt;
 ;     Closes and HTTP handle for the given URL&lt;br /&gt;
 ;&lt;br /&gt;
 ; Here are some things you can do after opening a handle, but before saving/downloading it as a file&lt;br /&gt;
 ; Manage POST data:&lt;br /&gt;
 ;   /http.addpost &amp;lt;handle&amp;gt; &amp;lt;variable&amp;gt; &amp;lt;value&amp;gt;&lt;br /&gt;
 ;   /http.delpost &amp;lt;handle&amp;gt; &amp;lt;variable&amp;gt;&lt;br /&gt;
 ; Manage cookies &lt;br /&gt;
 ;   /http.addcookie &amp;lt;handle&amp;gt; &amp;lt;value&amp;gt;&lt;br /&gt;
 ;   $http.cookie(handle,N) - gets Nth cookie&lt;br /&gt;
 ;&lt;br /&gt;
 ; After a request completes (e.g. after a save) you can get some data:&lt;br /&gt;
 ;     $http.responseheader(handle, header, N) - Returns value of given responseheader, or $false. Only useful after a request is made&lt;br /&gt;
 ;&lt;br /&gt;
 ; Signals&lt;br /&gt;
 ;   In order to tell via script when something happens (your file is being saved, for example) use&lt;br /&gt;
 ;   on *:SIGNAL:http:&lt;br /&gt;
 ;   where $1 = Handle name, $2 = Event name, $3- = parameters&lt;br /&gt;
 ;   Events:&lt;br /&gt;
 ;        COMPLETED &amp;lt;statuscode&amp;gt;   -  when a request completes&lt;br /&gt;
 ;        SAVED &amp;lt;location&amp;gt;         - when a save completes&lt;br /&gt;
 ;        REDIRECT &amp;lt;location&amp;gt;      - when a request is redirected elsewhere &lt;br /&gt;
 ;        PROGRESS &amp;lt;bytes&amp;gt; [total size] - When part but not all of the data is downloaded. Total size is not available for chunked transfer&lt;br /&gt;
 ;       &lt;br /&gt;
 ;&lt;br /&gt;
 ; Known issues:&lt;br /&gt;
 ;    Cookies do not respect attributes such as domain, path, expiration, or secure. They area always sent&lt;br /&gt;
 ;    Relative redirects don&amp;#039;t work, only absolute&lt;br /&gt;
 ;    Redirects from insecure to secure links when you don&amp;#039;t have SSL will not be handled well&lt;br /&gt;
 ; Creates a request that when completed is saved to a file&lt;br /&gt;
 alias http.save {&lt;br /&gt;
   if ($1 == -f) {&lt;br /&gt;
     var %force = $true&lt;br /&gt;
     tokenize 32 $2-&lt;br /&gt;
   }&lt;br /&gt;
   else { var %force = $false }&lt;br /&gt;
   if ($0 &amp;lt; 2) { &lt;br /&gt;
     echo -atg * /http.save: Use /http.save &amp;lt;http handle&amp;gt; &amp;lt;file&amp;gt;&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   var %hashtable = http. $+ $1&lt;br /&gt;
   if (!$hget(%hashtable)) { &lt;br /&gt;
     echo -atg * /http.save: No such HTTP handle exists. Use /http.open first&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   if ($sock(%hashtable)) {&lt;br /&gt;
     echo -atg * /http.save: There is a pending request for this HTTP handle already. A connection is open the the remote host. Close it, or wait for it to complete &lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   var %file = $2-&lt;br /&gt;
   if ($exists(%file)) {&lt;br /&gt;
     if (%force) {&lt;br /&gt;
       .remove %file&lt;br /&gt;
     }&lt;br /&gt;
     else {&lt;br /&gt;
       echo -atg * /http.save: File already exists. Try /http.save -f to force an overwrite&lt;br /&gt;
       return&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   ;  Open file handler stream for writing&lt;br /&gt;
   .fopen -n %hashtable %file&lt;br /&gt;
   if ($ferr) {&lt;br /&gt;
     echo -atg * /http.save: Could not use file. Error: $ferr&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   ; Store fstream name in hashtable to indicate that we want to save this once it completes&lt;br /&gt;
   .hadd %hashtable fstream %hashtable&lt;br /&gt;
   ; Set redirect counter to 0&lt;br /&gt;
   .hadd %hashtable redirects 0&lt;br /&gt;
   ; Start socket&lt;br /&gt;
   http.sockstart %hashtable&lt;br /&gt;
 }&lt;br /&gt;
 ; Opens socket&lt;br /&gt;
 alias -l http.sockstart {&lt;br /&gt;
   if ($hget($1,secure) == $true) {&lt;br /&gt;
     if ($sock($1) &amp;amp;&amp;amp; $sock($1).ssl) { &lt;br /&gt;
       http.sendrequest $1&lt;br /&gt;
     } &lt;br /&gt;
     else {&lt;br /&gt;
       if ($sock($1)) { .sockclose $1 }&lt;br /&gt;
       if (!$sslready) {&lt;br /&gt;
         echo -atg HTTP Error - request $qt($right($1,-5)) would require you to use SSL but you are not SSL ready. Please see http://mirc.com/ssl.html&lt;br /&gt;
         http.close $right($1,-5)&lt;br /&gt;
         return&lt;br /&gt;
       }&lt;br /&gt;
       sockopen -e $1 $hget($1, host) $hget($1, port)&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   else {&lt;br /&gt;
     if ($sock($1)) {&lt;br /&gt;
       http.sendrequest $1&lt;br /&gt;
     }&lt;br /&gt;
     else {&lt;br /&gt;
       sockopen $1 $hget($1, host) $hget($1, port)&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 ; Sends the request. Assumes the socket is open and ready&lt;br /&gt;
 alias -l http.sendrequest {&lt;br /&gt;
   if (!$sock($1)) { echo -atg HTTP Internal error. Socket not open in /http.sendrequest | return }&lt;br /&gt;
   var %inname = $1&lt;br /&gt;
   var %exname = $right($1,-5)&lt;br /&gt;
   ; Cleanup from previous requests&lt;br /&gt;
   .hdel %inname responseheaders&lt;br /&gt;
   .hdel %inname body&lt;br /&gt;
   .hdel %inname contentlength&lt;br /&gt;
   .hdel %inname chunkleft&lt;br /&gt;
   ; Get POST binvar&lt;br /&gt;
   var %postBV = $http.postdata(%inname)&lt;br /&gt;
   ; Use GET if there&amp;#039;s no post data, POST otherwise&lt;br /&gt;
   if ($bvar(%postBV,0) == 0) {&lt;br /&gt;
     sockwrite -n %inname GET $hget(%inname,path) HTTP/1.1 &lt;br /&gt;
   }&lt;br /&gt;
   else {&lt;br /&gt;
     sockwrite -n %inname POST $hget(%inname,path) HTTP/1.1 &lt;br /&gt;
   }&lt;br /&gt;
   ; Send the host&lt;br /&gt;
   sockwrite -n %inname Host: $hget(%inname,host)&lt;br /&gt;
   ; Send the user-agent&lt;br /&gt;
   sockwrite -n %inname User-agent: $hget(%inname,user-agent)&lt;br /&gt;
   sockwrite -n %inname Connection: Keep-Alive&lt;br /&gt;
   ; Only plain-text supported&lt;br /&gt;
   sockwrite -n %inname Accept: text/plain; q=0.5, text/html&lt;br /&gt;
   ; Send cookies&lt;br /&gt;
   if ($http.cookie(%exname, 0) &amp;gt; 0) {&lt;br /&gt;
     sockwrite %inname Cookie: $+ $chr(32)&lt;br /&gt;
     var %i = 1&lt;br /&gt;
     while ($http.cookie(%exname, %i)) {&lt;br /&gt;
       sockwrite %inname $http.urlencode($ifmatch) $+ ;&lt;br /&gt;
       inc %i&lt;br /&gt;
     }&lt;br /&gt;
     sockwrite -n %inname&lt;br /&gt;
   }&lt;br /&gt;
   ; If POST send content type and length&lt;br /&gt;
   if ($bvar(%postBV,0) &amp;gt; 0) {&lt;br /&gt;
     sockwrite -n %inname Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
     sockwrite -n %inname Content-Length: $v1&lt;br /&gt;
   }&lt;br /&gt;
   ; End request headers with empty line&lt;br /&gt;
   sockwrite -n %inname&lt;br /&gt;
   ; If POST, send data&lt;br /&gt;
   if ($bvar(%postBV,0) &amp;gt; 0) {&lt;br /&gt;
     sockwrite %inname %postBV&lt;br /&gt;
     ; sockwrite -n %inname&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 ; Just some bookeeping in case we miss it &lt;br /&gt;
 on *:SOCKCLOSE:http.*: {&lt;br /&gt;
   if ($fopen($sockname)) { .fclose $sockname }&lt;br /&gt;
 }&lt;br /&gt;
 on *:SOCKOPEN:http.*: {&lt;br /&gt;
   http.sendrequest $sockname&lt;br /&gt;
 }&lt;br /&gt;
 on *:SOCKREAD:http.*: {&lt;br /&gt;
   if ($sockerr &amp;gt; 0) {&lt;br /&gt;
     echo -atg * HTTP handle $qt($right($sockname,-5)) failed with socket error $sockerr&lt;br /&gt;
     http.close $right($sockname,-5)&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   ;Read all the data into &amp;amp;bvTemp&lt;br /&gt;
   :read&lt;br /&gt;
   ; First, read this buffer&lt;br /&gt;
   sockread &amp;amp;bvThis&lt;br /&gt;
   if ($sockbr &amp;gt; 0) {&lt;br /&gt;
     ; If data was read, copy it to the on-going buffer and continue&lt;br /&gt;
     bcopy &amp;amp;bvTemp $calc($bvar(&amp;amp;bvTemp,0) +1) &amp;amp;bvThis 1 -1&lt;br /&gt;
     goto read&lt;br /&gt;
   }&lt;br /&gt;
   if ($bvar(&amp;amp;bvTemp,0) == 0) { echo -atg HTTP sockread called with no data to read... | return }&lt;br /&gt;
   ; Do we need to parse headers?&lt;br /&gt;
   ; If response headers not set, this call has the headers&lt;br /&gt;
   if (!$hget($sockname,responseheaders)) {&lt;br /&gt;
     ; Find the response headers&lt;br /&gt;
     var %end = $bfind(&amp;amp;bvTemp,1, 13 10 13 10)&lt;br /&gt;
     if (%end == 0) { echo -atg Error: No headers found, but no content length so this can&amp;#039;t be a subsequent call | return }&lt;br /&gt;
     ; Increase to include the 3 extra characters&lt;br /&gt;
     inc %end 3&lt;br /&gt;
     bcopy &amp;amp;bvResponseHeaders 1 &amp;amp;bvTemp 1 %end&lt;br /&gt;
     ; If there&amp;#039;s still non-header data copy it over&lt;br /&gt;
     if (%end &amp;lt; $bvar(&amp;amp;bvTemp, 0)) { &lt;br /&gt;
       bcopy -c &amp;amp;bvTemp 1 &amp;amp;bvTemp $calc(%end + 1) -1&lt;br /&gt;
     }&lt;br /&gt;
     else { bunset &amp;amp;bvTemp }&lt;br /&gt;
     ; If this is the first header response, save in hash table&lt;br /&gt;
     if (!$hget($sockname, responseheaders)) {&lt;br /&gt;
       .hadd -b $sockname responseheaders &amp;amp;bvResponseHeaders &lt;br /&gt;
       http.OnHeaders $sockname&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   ; there&amp;#039;s no more to read, bail&lt;br /&gt;
   if (!$bvar(&amp;amp;bvTemp,0)) {&lt;br /&gt;
     ; If that&amp;#039;s all this response has to offer, we&amp;#039;re done&lt;br /&gt;
     if ($hget($sockname,contentlength) == 0) {&lt;br /&gt;
       http.ondone $sockname&lt;br /&gt;
     }&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   ; Read body&lt;br /&gt;
   var %contentlength = $hget($sockname,contentlength)&lt;br /&gt;
   if (%contentlength == $null || %contentlength == $false) {&lt;br /&gt;
     var %chunked = $true&lt;br /&gt;
   }&lt;br /&gt;
   else {&lt;br /&gt;
     var %chunked = $false&lt;br /&gt;
   }&lt;br /&gt;
   ; Set bvBody to the body ready so far&lt;br /&gt;
   if ($hget($sockname,body)) {&lt;br /&gt;
     noop $hget($sockname, body, &amp;amp;bvBody)&lt;br /&gt;
   }&lt;br /&gt;
   if (%chunked) {&lt;br /&gt;
     :readChunk&lt;br /&gt;
     var %chunkleft = $hget($sockname, chunkleft)&lt;br /&gt;
     if (!%chunkleft) {&lt;br /&gt;
       ; If we&amp;#039;ve read all of a chunk, or this is the first one, get its size&lt;br /&gt;
       var %crlf = $bfind(&amp;amp;bvTemp, 1, 13 10)&lt;br /&gt;
       if (!%crlf) {&lt;br /&gt;
         echo -atg HTTP internal error. Handle $qt($right($sockname,-5)) is in chunked encoding but no chunk size found in data&lt;br /&gt;
         return&lt;br /&gt;
       }&lt;br /&gt;
       var %chunkleft = $base($bvar(&amp;amp;bvTemp, 1, $calc(%crlf - 1)).text,16,10)&lt;br /&gt;
       if (%chunkleft !isnum) {&lt;br /&gt;
         echo -atg HTTP internal error. Handle $qt($right($sockname,-5))  has invalid chunk size: %chunkleft&lt;br /&gt;
       }&lt;br /&gt;
       ; New chunk&lt;br /&gt;
       else {&lt;br /&gt;
         ; Save chunk size and remove it (plus its \r\n) from temp&lt;br /&gt;
         .hadd $sockname chunkleft %chunkleft&lt;br /&gt;
         .bcopy -c &amp;amp;bvTemp 1 &amp;amp;bvTemp $calc(%crlf +2) -1&lt;br /&gt;
         if (%chunkLeft == 0) { &lt;br /&gt;
           ; if we just read chunk size 0, that was the end. &lt;br /&gt;
           .hadd -b $sockname body &amp;amp;bvBody&lt;br /&gt;
           http.onDone $sockname&lt;br /&gt;
           return&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
     ; read %chunkleft bytes&lt;br /&gt;
     var %bytesToRead = $iif(%chunkLeft &amp;lt; $bvar(&amp;amp;bvTemp,0),%chunkLeft, $bvar(&amp;amp;bvTemp,0))&lt;br /&gt;
     .bcopy &amp;amp;bvBody $calc($bvar(&amp;amp;bvBody,0) +1) &amp;amp;bvTemp 1 %bytesToRead&lt;br /&gt;
     hdec $sockname chunkleft %bytesToRead&lt;br /&gt;
     .signal http $right($sockname,-5) PROGRESS %bytesToRead&lt;br /&gt;
     if (%bytesToRead == %chunkLeft) {&lt;br /&gt;
       ; If this is the end of the chunk, consume crlf&lt;br /&gt;
       inc %bytesToRead 2&lt;br /&gt;
       ; If there&amp;#039;s still stuff in this var, go back and read the new chunk&lt;br /&gt;
       if (%bytesToRead &amp;lt; $bvar(&amp;amp;bvTemp,0)) {&lt;br /&gt;
         .bcopy -c &amp;amp;bvTemp 1 &amp;amp;bvTemp $calc(%bytesToRead + 1) -1    &lt;br /&gt;
         goto readChunk&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
     ; End of this call, save body in hashtable for future calls&lt;br /&gt;
     .hadd -b $sockname body &amp;amp;bvBody&lt;br /&gt;
   }&lt;br /&gt;
   else {&lt;br /&gt;
     ; Copy everything&lt;br /&gt;
     .bcopy &amp;amp;bvBody $calc($bvar(&amp;amp;bvBody,0) +1) &amp;amp;bvTemp 1 -1&lt;br /&gt;
     ; Add read-so-far body to hashtable&lt;br /&gt;
     .hadd -b $sockname body &amp;amp;bvBody&lt;br /&gt;
     .signal http $right($sockname,-5) PROGRESS $bvar(&amp;amp;bvBody,0) $hget($sockname,contentlength) &lt;br /&gt;
     ; Check if we&amp;#039;re done&lt;br /&gt;
     if ($bvar(&amp;amp;bvBody,0) &amp;gt;= $hget($sockname,contentlength)) { &lt;br /&gt;
       ; We&amp;#039;re done&lt;br /&gt;
       http.onDone $sockname&lt;br /&gt;
       if ($bvar(&amp;amp;bvBody,0) &amp;gt; $hget($sockname,contentlength)) { &lt;br /&gt;
         echo -qatg HTTP Warning: Read past content-length.&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 ; Internal event called when we get the first header response from the server&lt;br /&gt;
 alias -l http.OnHeaders {&lt;br /&gt;
   noop $hget($1,responseheaders, &amp;amp;bvResponseHeaders)&lt;br /&gt;
   ; First header is always the status response&lt;br /&gt;
   var %end = $bfind(&amp;amp;bvResponseHeaders, 1, 13 10)&lt;br /&gt;
   if (%end &amp;lt;= 1) {&lt;br /&gt;
     echo -atg Error: HTTP $qt($right($1,-5)) Server did not respond with HTTP status &lt;br /&gt;
     goto cleanup&lt;br /&gt;
   }&lt;br /&gt;
   var %status = $bvar(&amp;amp;bvResponseHeaders,1,$calc(%end - 1)).text&lt;br /&gt;
   .hadd $1 responsestatus %status&lt;br /&gt;
   var %version = $gettok(%status,1,32)&lt;br /&gt;
   if (%version != HTTP/1.1 &amp;amp;&amp;amp; %version != HTTP/1.0) {&lt;br /&gt;
     echo -atg Error: HTTP $qt($right($1,-5)) Server indicated unknown version: %version&lt;br /&gt;
     goto cleanup&lt;br /&gt;
   }&lt;br /&gt;
   var %statuscode = $gettok(%status,2,32)&lt;br /&gt;
   if (%statuscode !isnum) {&lt;br /&gt;
     echo -atg Error: HTTP $qt($right($1,-5)) Server indicated invalid status code: %statuscode&lt;br /&gt;
     goto cleanup&lt;br /&gt;
   }&lt;br /&gt;
   ; Check transfer type&lt;br /&gt;
   if ($http.responseheader($right($1,-5),Content-Length,1) != $null) {&lt;br /&gt;
     hadd $1 contentlength $v1&lt;br /&gt;
   }&lt;br /&gt;
   elseif ($http.responseheader($right($1,-5), Transfer-Encoding, 1) != chunked) {&lt;br /&gt;
     echo -atg HTTP Handle $qt($right($1,-5)) has no content-length header and is not chunked&lt;br /&gt;
     echo -atg $bvar(&amp;amp;bvResponseHeaders,1-).text&lt;br /&gt;
     return&lt;br /&gt;
   } &lt;br /&gt;
   ; Add any cookies that were set&lt;br /&gt;
   var %cookie = 1&lt;br /&gt;
   while ($http.responseheader($right($1,-5), Set-Cookie, %cookie)) {&lt;br /&gt;
     inc %cookie&lt;br /&gt;
     var %cookieValue = $gettok($ifmatch,1,$asc(;))&lt;br /&gt;
     http.addcookie $right($1,-5) %cookieValue&lt;br /&gt;
   }&lt;br /&gt;
   ; Handle redirects&lt;br /&gt;
   if (%statuscode == 303 || %statuscode == 302 || %statuscode == 307) {&lt;br /&gt;
     var %location = $http.responseheader($right($1,-5), Location)&lt;br /&gt;
     .signal http $right($1,-5) REDIRECT %location&lt;br /&gt;
     http.seturl $1 %location&lt;br /&gt;
     hinc $1 redirects&lt;br /&gt;
     ; If the server doesn&amp;#039;t promise us this connection is keep-alive, close it and use a new one&lt;br /&gt;
     if ($http.responseheader($right($1,-5), Connection, 1) != Keep-Alive) {&lt;br /&gt;
       if ($sock($1)) { .sockclose $1 }&lt;br /&gt;
     }&lt;br /&gt;
     if ($hget($1, redirects) &amp;gt; 5) {&lt;br /&gt;
       echo -atg HTTP Handle $qt($right($1,-5)) redirect loop detected&lt;br /&gt;
       return&lt;br /&gt;
     }&lt;br /&gt;
     http.sockstart $1&lt;br /&gt;
   }&lt;br /&gt;
   return&lt;br /&gt;
   :cleanup&lt;br /&gt;
   if ($sock($1)) { .sockclose $1 }&lt;br /&gt;
 }&lt;br /&gt;
 alias http.addcookie {&lt;br /&gt;
   var %hashtable = http. $+ $1&lt;br /&gt;
   if (!$hget(%hashtable)) {&lt;br /&gt;
     echo -atg * /http.addcookie: No such HTTP handle&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   if ($0 &amp;lt; 2) {&lt;br /&gt;
     echo -atg * /http.addcookie: Usage: /http.addcookie &amp;lt;handle&amp;gt; &amp;lt;value&amp;gt;&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   var %i = 1&lt;br /&gt;
   var %cookieNum = 1&lt;br /&gt;
   while ($hget(%hashtable,%i).item) {&lt;br /&gt;
     var %item = $ifmatch&lt;br /&gt;
     inc %i&lt;br /&gt;
     if (cookie-* iswm %item) {&lt;br /&gt;
       var %tmp = $gettok(%item,2,$asc(-))&lt;br /&gt;
       ; If the value is the same, overwrite&lt;br /&gt;
       if ($2- == $hget(%hashtable,%item)) {&lt;br /&gt;
         %cookieNum = %tmp&lt;br /&gt;
         break&lt;br /&gt;
       }&lt;br /&gt;
       ; Otherwise store max cookie num&lt;br /&gt;
       elseif (%tmp &amp;gt;= %cookieNum) { %cookieNum = $calc(%tmp + 1) }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   .hadd %hashtable cookie- $+ %cookieNum $+ -value $2-&lt;br /&gt;
 }&lt;br /&gt;
 ; Gets an HTTP cookie for the given handle&lt;br /&gt;
 ; $http.cookie(&amp;lt;handle&amp;gt;, &amp;lt;index&amp;gt;)&lt;br /&gt;
 alias http.cookie {&lt;br /&gt;
   if ($2 !isnum) {&lt;br /&gt;
     echo -atg * $!http.cookie invalid parameters&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   var %hashtable = http. $+ $1&lt;br /&gt;
   if (!$hget(%hashtable)) {&lt;br /&gt;
     echo -atg * $!http.cookie no such HTTP handle &lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   var %i = 1&lt;br /&gt;
   var %found = 0&lt;br /&gt;
   while ($hget(%hashtable, %i).item) {&lt;br /&gt;
     inc %i&lt;br /&gt;
     var %item = $ifmatch&lt;br /&gt;
     if (cookie-*-value iswm %item) {&lt;br /&gt;
       inc %found&lt;br /&gt;
       var %id = $gettok(%item,2,$asc(-))&lt;br /&gt;
       if (%found == $2) {&lt;br /&gt;
         return $hget(%hashtable, cookie- $+ %id $+ -value)&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   if ($2 == 0) { return %found }&lt;br /&gt;
 }&lt;br /&gt;
 ; Returns the value of the given response header&lt;br /&gt;
 ; Case sensitive since it is binary variable operation&lt;br /&gt;
 alias http.responseheader {&lt;br /&gt;
   if ($0 &amp;lt; 2) {&lt;br /&gt;
     echo -atg Invalid usage. Use: $http.responseheader(&amp;lt;handle&amp;gt;, &amp;lt;header&amp;gt;[, index])&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   ; %index is parameter 3 - 1-N or 0 for number&lt;br /&gt;
   var %index = 1&lt;br /&gt;
   if ($3 isnum) {&lt;br /&gt;
     %index = $3&lt;br /&gt;
   }&lt;br /&gt;
   ; Veriy hash table exists&lt;br /&gt;
   var %table = http. $+ $1&lt;br /&gt;
   if (!$hget(%table,responseheaders)) { return $false }&lt;br /&gt;
   noop $hget(%table,responseheaders, &amp;amp;bvResponseHeaders))&lt;br /&gt;
   ; Set up parameters for the header search&lt;br /&gt;
   ; Offset is where we start searching from in the loop&lt;br /&gt;
   ; thisIndex is the number of matches found so far&lt;br /&gt;
   var %offset = 1&lt;br /&gt;
   var %thisIndex = 0&lt;br /&gt;
   ; The main search loop&lt;br /&gt;
   :search&lt;br /&gt;
   var %start = $bfind(&amp;amp;bvResponseHeaders, %offset, $2 $+ :).text&lt;br /&gt;
   ; If there isn&amp;#039;t another match, either the index was too large or they want the count&lt;br /&gt;
   if (!%start) { &lt;br /&gt;
     if (%index == 0) { return %thisIndex }&lt;br /&gt;
     else { return $false  }&lt;br /&gt;
   }&lt;br /&gt;
   ; Find the end of the header&lt;br /&gt;
   var %end = $bfind(&amp;amp;bvResponseHeaders, %start, 13 10)&lt;br /&gt;
   if (%end &amp;lt;= %start) { echo -atg HTTP Internal error ($http.responseheader), header $qt($2) for handle $qt($1) has no CRLF termination | return $false }&lt;br /&gt;
   inc %thisIndex&lt;br /&gt;
   ; If this not the one they asked for, try again starting from the end of this header&lt;br /&gt;
   if (%index != %thisIndex) {&lt;br /&gt;
     var %offset = %end&lt;br /&gt;
     goto search&lt;br /&gt;
   }&lt;br /&gt;
   ; Find the colon. If there isn&amp;#039;t one we&amp;#039;ll return the whole string&lt;br /&gt;
   if ($calc($bfind(&amp;amp;bvResponseHeaders, %start, $asc(:)) +1) &amp;lt; %end) {&lt;br /&gt;
     %start = $v1&lt;br /&gt;
   }&lt;br /&gt;
   return $bvar(&amp;amp;bvResponseHeaders,%start, $calc(%end - %start)).text&lt;br /&gt;
 }&lt;br /&gt;
 ; Internal event called when a request is filled. $1 = internal handle name&lt;br /&gt;
 alias -l http.onDone {&lt;br /&gt;
   if ($hget($1,responseheaders)) {&lt;br /&gt;
     noop $hget($1,responseheaders,&amp;amp;bvResponseHeaders)&lt;br /&gt;
   }&lt;br /&gt;
   ; Write out and close filestream if set&lt;br /&gt;
   if ($hget($1,fstream)) {&lt;br /&gt;
     noop $hget($1,body,&amp;amp;bvBody)&lt;br /&gt;
     if (!$bvar(&amp;amp;bvBody,0)) {&lt;br /&gt;
       .fclose $hget($1,fstream)&lt;br /&gt;
     }&lt;br /&gt;
     else {&lt;br /&gt;
       .fwrite -b $hget($1,fstream) &amp;amp;bvBody&lt;br /&gt;
       ; Save fname so we can use it in the signal after the close&lt;br /&gt;
       var %fname = $fopen($hget($1,fstream)).fname&lt;br /&gt;
       .fclose $hget($1,fstream)&lt;br /&gt;
       .signal http $right($1,-5) SAVED %fname&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   ; If socket is still around, close it&lt;br /&gt;
   if ($sock($1)) { .sockclose $1 }&lt;br /&gt;
   ; Reset redirects for future calls&lt;br /&gt;
   .hadd $1 redirects 0&lt;br /&gt;
   .signal HTTP $right($1,-5) COMPLETED $hget($1,responsestatus)&lt;br /&gt;
 }&lt;br /&gt;
 alias http.open {&lt;br /&gt;
   var %hashtable&lt;br /&gt;
   ; If two parameters are given, $1 is the name, else create a new name&lt;br /&gt;
   if ($0 &amp;gt; 1) { %hashtable = http. $+ $1 }&lt;br /&gt;
   else { &lt;br /&gt;
     var %h = $calc($ticks % $rand(1,1000000))&lt;br /&gt;
     var %hashtable = http. $+ %h  &lt;br /&gt;
   }&lt;br /&gt;
   if ($hget(%hashtable)) {&lt;br /&gt;
     echo -atg * /http.open: HTTP Request $qt($1) already exists&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   ; Encode the octects of the URL. e.g.: foo bar,pie --&amp;gt; foo%20bar,%2Cpie&lt;br /&gt;
   var %url = $iif($0 &amp;gt; 1, $2-, $1-)&lt;br /&gt;
   var %urlEncoded = $http.urlencode(%url)&lt;br /&gt;
   ; Check the URL&lt;br /&gt;
   if (!$http.urlparse(%urlEncoded)) {&lt;br /&gt;
     echo -atg * /http.open: Malformed URL. Use /http.open [name] &amp;lt;url&amp;gt; &lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   if ($http.urlparse(%urlEncoded).secure &amp;amp;&amp;amp; !$sslready) {&lt;br /&gt;
     echo -atg * /http.open: URL is SSL but $!sslready = false. See http://www.mirc.com/ssl.html&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   ; Everything checks out, let&amp;#039;s store the relevent bits in a hashtable&lt;br /&gt;
   .hmake %hashtable 10&lt;br /&gt;
   http.seturl %hashtable %url&lt;br /&gt;
   echo -qatg * /http.open: Opened HTTP request $qt($right(%hashtable,-5))&lt;br /&gt;
 }&lt;br /&gt;
 alias -l http.seturl {&lt;br /&gt;
   if ($0 &amp;lt; 2) { echo -atg HTTP Internal error, seturl called with no url }&lt;br /&gt;
   var %hashtable = $1&lt;br /&gt;
   if (!$hget(%hashtable)) { echo -atg HTTP Internal error, seturl called with invalid handle }&lt;br /&gt;
   var %urlEncoded = $http.urlencode($2-)&lt;br /&gt;
   .hadd %hashtable host $http.urlparse(%urlEncoded).host&lt;br /&gt;
   .hadd %hashtable port $http.urlparse(%urlEncoded).port&lt;br /&gt;
   .hadd %hashtable secure $http.urlparse(%urlEncoded).secure&lt;br /&gt;
   .hadd %hashtable path $http.urlparse(%urlEncoded).path&lt;br /&gt;
   .hadd %hashtable user-agent mIRC $version&lt;br /&gt;
 }&lt;br /&gt;
 alias http.list {&lt;br /&gt;
   var %i = 1&lt;br /&gt;
   var %numFound = 0&lt;br /&gt;
   while (%i &amp;lt;= $hget(0)) {&lt;br /&gt;
     var %table = $hget(%i)&lt;br /&gt;
     inc %i&lt;br /&gt;
     if (http.* iswm %table) {&lt;br /&gt;
       inc %numFound&lt;br /&gt;
       echo -atg * $right(%table,-5) $+ : Host: $hget(%table,host) Port: $hget(%table,port) Path: $hget(%table,path)&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   if (%numFound == 0) { echo -atg * No HTTP handles opened }&lt;br /&gt;
 }&lt;br /&gt;
 alias http.close {&lt;br /&gt;
   var %i = 1&lt;br /&gt;
   var %numFound = 0&lt;br /&gt;
   while (%i &amp;lt;= $hget(0)) {&lt;br /&gt;
     var %table = $hget(%i)&lt;br /&gt;
     if (http. $+ $1 iswm %table) {&lt;br /&gt;
       ; Cleanup resources&lt;br /&gt;
       if ($sock(%table)) { .sockclose %table }&lt;br /&gt;
       if ($fopen(%table)) { .fclose %table }&lt;br /&gt;
       if ($hget(%table $+ .postdata)) { .hfree %table $+ .postdata }&lt;br /&gt;
       .hfree %table&lt;br /&gt;
       inc %numFound&lt;br /&gt;
       echo -qatg * HTTP Closed $right(%table,-5) &lt;br /&gt;
     }&lt;br /&gt;
     ; Only inc if we didnt find a match&lt;br /&gt;
     else {&lt;br /&gt;
       inc %i&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   if (%numFound == 0) {  echo -qatg * No matching HTTP handles } &lt;br /&gt;
 }&lt;br /&gt;
 ;&lt;br /&gt;
 ; Takes an encoded URL and returns based on the property&lt;br /&gt;
 ; .secure - true if https&lt;br /&gt;
 ; .host - the URL host&lt;br /&gt;
 ; .port - the port, 80 by default&lt;br /&gt;
 ; .path - The path to download, / by default&lt;br /&gt;
 ;  Returns $false is URL is malformed&lt;br /&gt;
 ;&lt;br /&gt;
 alias http.urlparse {&lt;br /&gt;
   var %secure&lt;br /&gt;
   var %host&lt;br /&gt;
   var %port&lt;br /&gt;
   var %path&lt;br /&gt;
   var %regex = /^(https?://)?([a-z.0-9\-_]+)(:\d+)?(/.*)?$/i&lt;br /&gt;
   if ($regex($1, %regex)) {&lt;br /&gt;
     if (http*:// iswm $regml(1)) {&lt;br /&gt;
       %protocol = $lower($left($regml(1),-3))&lt;br /&gt;
     }&lt;br /&gt;
     %secure = $false&lt;br /&gt;
     if (%protocol == https) { &lt;br /&gt;
       %secure = $true&lt;br /&gt;
     }&lt;br /&gt;
     if (%protocol) { %host = $regml(2) }&lt;br /&gt;
     else { %host = $regml(1) }  &lt;br /&gt;
     var %portIndex = $iif(%protocol, 3, 2)&lt;br /&gt;
     var %portfound = $false&lt;br /&gt;
     if ($left($regml(%portIndex),1) == : &amp;amp;&amp;amp; $right($regml(%portIndex),-1) isnum) {&lt;br /&gt;
       %port = $right($regml(%portIndex),-1) &lt;br /&gt;
       %portFound = $true&lt;br /&gt;
     }&lt;br /&gt;
     else {&lt;br /&gt;
       if (%secure) { &lt;br /&gt;
         %port = 443&lt;br /&gt;
       }&lt;br /&gt;
       else {&lt;br /&gt;
         %port = 80&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
     %pathIndex = $iif(%portFound, $calc(%portIndex + 1), %portIndex)&lt;br /&gt;
     if ($regml(0) &amp;gt;= %pathIndex) {&lt;br /&gt;
       %path = $regml(%pathIndex)&lt;br /&gt;
     }&lt;br /&gt;
     else { %path = / }&lt;br /&gt;
   }  &lt;br /&gt;
   else { return $false }&lt;br /&gt;
   if ($prop == secure) { return %secure }&lt;br /&gt;
   if ($prop == host) { return %host }&lt;br /&gt;
   if ($prop == path) { return %path }&lt;br /&gt;
   if ($prop == port) { return %port }&lt;br /&gt;
   return $true&lt;br /&gt;
 }&lt;br /&gt;
 alias http.addpost {&lt;br /&gt;
   if ($0 &amp;lt; 3) { &lt;br /&gt;
     echo -atg * /http.addpost: Usage: /http.addpost &amp;lt;handle&amp;gt; &amp;lt;variable&amp;gt; &amp;lt;value&amp;gt;&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   var %maintable = http. $+ $1&lt;br /&gt;
   var %posttable = %maintable $+ .postdata&lt;br /&gt;
   if (!$hget(%maintable)) {&lt;br /&gt;
     echo -atg * /http.addpost: No such HTTP handle found&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   if (!$hget(%posttable)) { .hmake %posttable 10 }&lt;br /&gt;
   hadd %posttable $2 $3-&lt;br /&gt;
   echo -qatg Post variable added: $2 $+ = $+ $3-&lt;br /&gt;
 }&lt;br /&gt;
 alias http.delpost {&lt;br /&gt;
   if ($0 &amp;lt; 2) {&lt;br /&gt;
     echo -atg * /http.delpost: Usage: /http.delpost &amp;lt;handle&amp;gt; &amp;lt;variable&amp;gt;&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   var %maintable = http. $+ $1&lt;br /&gt;
   var %posttable = %maintable $+ .postdata&lt;br /&gt;
   if (!$hget(%maintable)) {&lt;br /&gt;
     echo -atg * /http.addpost: No such HTTP handle found&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   if (!$hget(%posttable,$2)) {&lt;br /&gt;
     echo -qatg * /http.addpost: No post variable with that name exists&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   hdel %posttable $2&lt;br /&gt;
   echo -qatg Post variable deleted: $2&lt;br /&gt;
 }&lt;br /&gt;
 ; Usage: $http.postdata(handle)&lt;br /&gt;
 ; Returns a binvar with a post data style query string (x=y&amp;amp;z=a) or $false&lt;br /&gt;
 alias http.postdata {&lt;br /&gt;
   ; Post data is stored in INNAME.postdata&lt;br /&gt;
   var %posttable = http. $+ $1 $+ .postdata&lt;br /&gt;
   if (!$hget(%posttable,0).item) { return $false }&lt;br /&gt;
   var %i = 1&lt;br /&gt;
   while ($hget(%posttable,%i).item) {&lt;br /&gt;
     var %item = $ifmatch&lt;br /&gt;
     bset -t &amp;amp;bvPost $calc($bvar(&amp;amp;bvPost,0) +1) $iif(%i &amp;gt; 1,&amp;amp;,) $+ $http.urlencode(%item) $+ = $+ $http.urlencode($hget(%posttable,%item))&lt;br /&gt;
     inc %i&lt;br /&gt;
   }&lt;br /&gt;
   return &amp;amp;bvPost&lt;br /&gt;
 }&lt;br /&gt;
 ; Replace some commonly touchy URL characters with their hex-octect encoding&lt;br /&gt;
 alias -l http.urlencode {&lt;br /&gt;
   return $replacex($1-,$chr(32),% $+ 20, $chr(44), % $+ 2C,+, % $+ 2B, $chr(37), % $+ 25)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
{{Author|aca20031}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Archive]]&lt;/div&gt;</summary>
		<author><name>Aca20031</name></author>
	</entry>
</feed>