<?xml version="1.0" encoding="windows-1252"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Code400 -The Support Alternative - Forums</title>
		<link>https://code400.com/forum/</link>
		<description>vBulletin Forums</description>
		<language>en</language>
		<lastBuildDate>Mon, 24 Aug 2026 05:57:54 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>images/misc/rss.png</url>
			<title>Code400 -The Support Alternative - Forums</title>
			<link>https://code400.com/forum/</link>
		</image>
		<item>
			<title>HTTPAPI - Error parsing user/password from URL</title>
			<link>https://code400.com/forum/forum/iseries-programming-languages/rpg-rpgle/159543-httpapi-error-parsing-user-password-from-url</link>
			<pubDate>Tue, 11 Aug 2026 06:15:23 GMT</pubDate>
			<description><![CDATA[HTTPAPI does not correctly parse the user and password from a URL, such as &quot;http://user:password@10.212.66.112:8080/auth/basic/&quot;. 
 
The problem is the '@', which is a variant character and which has a different hex code on German systems. 
 
I am not sure whether it is the best option, but I made...]]></description>
			<content:encoded><![CDATA[HTTPAPI does not correctly parse the user and password from a URL, such as &quot;http://user<img src="https://code400.com/forum/core/images/smilies/tongue.gif" border="0" alt="" title="Stick Out Tongue" smilieid="6" class="inlineimg" />assword@10.212.66.112:8080/auth/basic/&quot;.<br />
<br />
The problem is the '@', which is a variant character and which has a different hex code on German systems.<br />
<br />
I am not sure whether it is the best option, but I made it working on your IBM i by updating procedure http_long_ParseURL() as shown below:<br />
<br />
Added:<br />
<br />

<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	
	<pre class="bbcode_code" style="max-height:calc(30 *  + 12px + 20px);">      // Define variant character @
     D AT              s              1C   inz(u'0040')
&#8203;</pre>
</div>&#8203;<br />
Updated:<br />
<br />

<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	
	<pre class="bbcode_code" style="max-height:calc(30 *  + 12px + 20px);">     C* find the last @ symbol in the host name.  It's important
     C* to use the last one, in case the userid is an e-mail address.
     C* for example:
     c*  http://bob@nospam.com:bigboy@www.scottklement.com
     c                   eval      wwPos = 0
     c                   eval      wwFound = %scan(AT: peHost) // Updated
     c                   dow       wwFound &gt; 1 and wwFound &lt; %size(peHost)
     c                   eval      wwPos = wwFound
     c                   eval      wwFound = %scan(AT: peHost: wwFound+1) // Updated
     c                   enddo
&#8203;</pre>
</div>Regards,<br />
<br />
Thomas.]]></content:encoded>
			<category domain="https://code400.com/forum/forum/iseries-programming-languages/rpg-rpgle">RPG/RPGLE</category>
			<dc:creator>tools400dev</dc:creator>
			<guid isPermaLink="true">https://code400.com/forum/forum/iseries-programming-languages/rpg-rpgle/159543-httpapi-error-parsing-user-password-from-url</guid>
		</item>
	</channel>
</rss>
