<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: iPhone Safari and XmlHttpRequest Authorization-Headers</title>
	<atom:link href="http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/feed/" rel="self" type="application/rss+xml" />
	<link>http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/</link>
	<description></description>
	<lastBuildDate>Thu, 24 Nov 2011 21:17:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Yuri</title>
		<link>http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/#comment-11974</link>
		<dc:creator>Yuri</dc:creator>
		<pubDate>Mon, 25 Apr 2011 15:31:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.devilx.net/?p=1026#comment-11974</guid>
		<description>Thank you man! What is more we use OData which is waiting for Authorization header! Lol!</description>
		<content:encoded><![CDATA[<p>Thank you man! What is more we use OData which is waiting for Authorization header! Lol!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Teguh Eko Budiarto</title>
		<link>http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/#comment-10171</link>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
		<pubDate>Mon, 06 Dec 2010 09:54:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.devilx.net/?p=1026#comment-10171</guid>
		<description>Your article saved me a lot of my time. Thank you very much to write this article.</description>
		<content:encoded><![CDATA[<p>Your article saved me a lot of my time. Thank you very much to write this article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gene G.</title>
		<link>http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/#comment-8645</link>
		<dc:creator>Gene G.</dc:creator>
		<pubDate>Sun, 01 Aug 2010 04:36:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.devilx.net/?p=1026#comment-8645</guid>
		<description>I just ran into this problem myself and before I found your page I actually packet sniffed the HTTP traffic from my iPhone (running 3.1.3). My results match yours: the iPhone (but not my iPad) forcibly removing the Authorization header. For what it&#039;s worth, this doesn&#039;t seem to be a problem any more in 3.2 or iOS 4.</description>
		<content:encoded><![CDATA[<p>I just ran into this problem myself and before I found your page I actually packet sniffed the HTTP traffic from my iPhone (running 3.1.3). My results match yours: the iPhone (but not my iPad) forcibly removing the Authorization header. For what it&#8217;s worth, this doesn&#8217;t seem to be a problem any more in 3.2 or iOS 4.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marius M.</title>
		<link>http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/#comment-6735</link>
		<dc:creator>Marius M.</dc:creator>
		<pubDate>Fri, 09 Apr 2010 17:05:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.devilx.net/?p=1026#comment-6735</guid>
		<description>Hi krishan,

thank you for the hint, first of all. Well, indeed this could be a solution for avoiding the limitation Apple seems to have built-in to the iPhone - although it&#039;s not a very practicable one. Due to the fact that you&#039;re actually providing your login credentials via URL, the whole login-procedure becomes worthless, since under specific (pretty easy to accomplish) circumstances those credentials could be read by third-parties.

Yet, I&#039;m still searching for a better solution.</description>
		<content:encoded><![CDATA[<p>Hi krishan,</p>
<p>thank you for the hint, first of all. Well, indeed this could be a solution for avoiding the limitation Apple seems to have built-in to the iPhone &#8211; although it&#8217;s not a very practicable one. Due to the fact that you&#8217;re actually providing your login credentials via URL, the whole login-procedure becomes worthless, since under specific (pretty easy to accomplish) circumstances those credentials could be read by third-parties.</p>
<p>Yet, I&#8217;m still searching for a better solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: krishnan</title>
		<link>http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/#comment-6710</link>
		<dc:creator>krishnan</dc:creator>
		<pubDate>Thu, 08 Apr 2010 10:36:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.devilx.net/?p=1026#comment-6710</guid>
		<description>Hi , 

I was able to find a way to solve this problem. Check out this http://for-budding-developers.blogspot.com/2010/04/iphone-web-app-accessing-webservice.html</description>
		<content:encoded><![CDATA[<p>Hi , </p>
<p>I was able to find a way to solve this problem. Check out this <a href="http://for-budding-developers.blogspot.com/2010/04/iphone-web-app-accessing-webservice.html" rel="nofollow">http://for-budding-developers.blogspot.com/2010/04/iphone-web-app-accessing-webservice.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marius M.</title>
		<link>http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/#comment-5148</link>
		<dc:creator>Marius M.</dc:creator>
		<pubDate>Mon, 08 Feb 2010 07:34:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.devilx.net/?p=1026#comment-5148</guid>
		<description>Hi Jon, Γειά Panagiotis and Hello James,

first of all, thank you all for your comments to my post. I&#039;m glad to see not being the only one fighting with this problem.

As I&#039;ve already explained within the post, using my own REST back-end it was simply possible to change the header&#039;s name to something that is not being blocked by the mobile Safari from being sent.

However, currently I&#039;m fighting the problem again, though now I&#039;m using an Apache 2 as back-end to which I&#039;d like to authorize using HTTP Basic Authentication. Unfortunately, Apple didn&#039;t seem to have removed this &quot;feature&quot; of the Authorization header not being sent by iPhone OS 3.1.2.

I was searching for a way to &quot;redirect&quot; an incoming X-Authorization or whatever-named header to &quot;Authorization&quot; *before* the Apache actually processes the header, unfortunately I had no success with SetEnvIf and RequestHeader settings in my .htaccess/000-default configuration.

Has any of you managed it, to &quot;rewrite&quot; the custom header back to the original &quot;Authorization&quot; header before the Apache actually processes the header-information, so that an iPhone Client could send &quot;Auth&quot; and still would be able to authenticate? :)

Here are some of my tries:

---
SetEnvIf Auth ^Basic MyAuth
RequestHeader add Authorization env=MyAuth
---
RequestHeader add Authorization &quot;%{Auth}e&quot;
---
SetEnvIf Auth &quot;^(Basic .+)$&quot; myauth
RequestHeader unset Authorization early
RequestHeader set Authorization env=myauth
---

None of them seem to be working on the Apache itself. Maybe, those only work on another Apache that would mod_proxy *before* the actual Apache that provides the authentication? Hm...</description>
		<content:encoded><![CDATA[<p>Hi Jon, Γειά Panagiotis and Hello James,</p>
<p>first of all, thank you all for your comments to my post. I&#8217;m glad to see not being the only one fighting with this problem.</p>
<p>As I&#8217;ve already explained within the post, using my own REST back-end it was simply possible to change the header&#8217;s name to something that is not being blocked by the mobile Safari from being sent.</p>
<p>However, currently I&#8217;m fighting the problem again, though now I&#8217;m using an Apache 2 as back-end to which I&#8217;d like to authorize using HTTP Basic Authentication. Unfortunately, Apple didn&#8217;t seem to have removed this &#8220;feature&#8221; of the Authorization header not being sent by iPhone OS 3.1.2.</p>
<p>I was searching for a way to &#8220;redirect&#8221; an incoming X-Authorization or whatever-named header to &#8220;Authorization&#8221; *before* the Apache actually processes the header, unfortunately I had no success with SetEnvIf and RequestHeader settings in my .htaccess/000-default configuration.</p>
<p>Has any of you managed it, to &#8220;rewrite&#8221; the custom header back to the original &#8220;Authorization&#8221; header before the Apache actually processes the header-information, so that an iPhone Client could send &#8220;Auth&#8221; and still would be able to authenticate? <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':)' class='wp-smiley' /> </p>
<p>Here are some of my tries:</p>
<p>&#8212;<br />
SetEnvIf Auth ^Basic MyAuth<br />
RequestHeader add Authorization env=MyAuth<br />
&#8212;<br />
RequestHeader add Authorization &#8220;%{Auth}e&#8221;<br />
&#8212;<br />
SetEnvIf Auth &#8220;^(Basic .+)$&#8221; myauth<br />
RequestHeader unset Authorization early<br />
RequestHeader set Authorization env=myauth<br />
&#8212;</p>
<p>None of them seem to be working on the Apache itself. Maybe, those only work on another Apache that would mod_proxy *before* the actual Apache that provides the authentication? Hm&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Emerton</title>
		<link>http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/#comment-5134</link>
		<dc:creator>James Emerton</dc:creator>
		<pubDate>Sun, 07 Feb 2010 19:51:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.devilx.net/?p=1026#comment-5134</guid>
		<description>I&#039;ve been doing much the same thing with an Ajax app that authenticates with our REST API using OAuth.  I&#039;ve done some additional research.

The &lt;a href=&quot;http://www.w3.org/TR/2009/WD-XMLHttpRequest2-20090820/#the-setrequestheader-method&quot; rel=&quot;nofollow&quot;&gt;current (Aug 2009) version&lt;/a&gt; of the XMLHttpRequest spec, Authorization is not in the list of proscribed headers.

The &lt;a href=&quot;http://www.w3.org/TR/2008/WD-XMLHttpRequest2-20080930/#setrequestheader&quot; rel=&quot;nofollow&quot;&gt;previous version&lt;/a&gt; does specify Authorization as a &quot;secure&quot; header.

I&#039;ll be implementing a workaround for now, setting both the Authorization and X-Authorization headers.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been doing much the same thing with an Ajax app that authenticates with our REST API using OAuth.  I&#8217;ve done some additional research.</p>
<p>The <a href="http://www.w3.org/TR/2009/WD-XMLHttpRequest2-20090820/#the-setrequestheader-method" rel="nofollow">current (Aug 2009) version</a> of the XMLHttpRequest spec, Authorization is not in the list of proscribed headers.</p>
<p>The <a href="http://www.w3.org/TR/2008/WD-XMLHttpRequest2-20080930/#setrequestheader" rel="nofollow">previous version</a> does specify Authorization as a &#8220;secure&#8221; header.</p>
<p>I&#8217;ll be implementing a workaround for now, setting both the Authorization and X-Authorization headers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Panagiotis Astithas</title>
		<link>http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/#comment-4847</link>
		<dc:creator>Panagiotis Astithas</dc:creator>
		<pubDate>Sun, 31 Jan 2010 12:20:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.devilx.net/?p=1026#comment-4847</guid>
		<description>If you go to settings and enable the debugger in Mobile Safari, you will observe an error saying that the browser refused to set unsafe header Authorization. So, it is actually a deliberate action, albeit unusual since RFC 2616 does not appear to require such behavior AFAICT. They are probably concerned about malicious scripts messing with user credentials during authentication.</description>
		<content:encoded><![CDATA[<p>If you go to settings and enable the debugger in Mobile Safari, you will observe an error saying that the browser refused to set unsafe header Authorization. So, it is actually a deliberate action, albeit unusual since RFC 2616 does not appear to require such behavior AFAICT. They are probably concerned about malicious scripts messing with user credentials during authentication.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/#comment-4686</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Mon, 25 Jan 2010 20:14:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.devilx.net/?p=1026#comment-4686</guid>
		<description>Thank you!  You are not the only one trying to get the iPhone to accept the javascript Authorization header.</description>
		<content:encoded><![CDATA[<p>Thank you!  You are not the only one trying to get the iPhone to accept the javascript Authorization header.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

