<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>marius &#187; jQuery</title>
	<atom:link href="http://devilx.net/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://devilx.net</link>
	<description></description>
	<lastBuildDate>Wed, 25 Jan 2012 07:42:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>iPhone Safari and XmlHttpRequest Authorization-Headers</title>
		<link>http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/</link>
		<comments>http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 19:58:55 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Life itself]]></category>
		<category><![CDATA[Mac and stuff ...]]></category>
		<category><![CDATA[World Wide Web]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Epic Fail]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Support]]></category>
		<category><![CDATA[XmlHttpRequest]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=1026</guid>
		<description><![CDATA[Lately I came across an odd phenomenon regarding the iPhone OS (3.1) Safari and web-sites that make use of JavaScript to set XmlHttpRequest-Headers, like for ETags or for authorization. I&#8217;ve analyzed the (mobile) Safari&#8217;s behavior, tried to find possible mistakes &#8230; <a href="http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Lately I came across an odd phenomenon regarding the iPhone OS (3.1) Safari and web-sites that make use of JavaScript to set XmlHttpRequest-Headers, like for ETags or for authorization. I&#8217;ve analyzed the (mobile) Safari&#8217;s behavior, tried to find possible mistakes within my JavaScript/jQuery code, searched the internet and even called Apple&#8217;s Technical Support (Germany) for more information on that problem. Let me first of all begin by describing the actual occurrence:</p>
<p>I&#8217;ve been working on a web-site that used the jQuery framework to render content on the client side and get information from its back-end, via XmlHttpRequests. The whole built-up worked just fine of every modern, popular browser available in the market &#8211; like the Firefox, Internet Explorer or Safari (on the Mac platform). Now, I had to test the site and make it workable on the iPhone-plattform as well. The site itself uses OAuth as authentication method and provides the information within a HTTP-header named &#8220;Authorization&#8221;. The theory is pretty plain: The back-end receives a request, checks for this header and responses accordingly.</p>
<p>However, iPhone&#8217;s Safari didn&#8217;t behave like the other browsers did. For whatever reason, the XHR was sent to the back-end, including every header that was set on the JavaScript side &#8211; except the &#8220;Authorization&#8221;-header. First, I though that Safari maybe could not handle the parameters of this header, but when I just renamed the setRequestHeader-argument to &#8220;Auth&#8221;, it worked. It simply just worked.</p>
<p>This happening made me search for other users experiencing this problem, unfortunately there doesn&#8217;t really seem to be many users testing JavaScript-sites on their iPhone &#8211; to be more precise, I did not find one result on Google that describes the problem I&#8217;m experiencing. I though, <em>&#8220;Oh well, why not call Apple&#8217;s Technical Support?&#8221;</em> &#8211; bad mistake. I got connected to a very annoyed and stroppy telephone-support which tried to convince me, that the iPhone&#8217;s Safari yet does not support Java. When I repeated myself by saying <em>&#8220;It&#8217;s about Java</em><strong><em>Script</em></strong><em>&#8220;</em>, he didn&#8217;t really make the impression to understand the difference. I told him what the actual scenario was and all I got as answer was <em>&#8220;Fill out the Feedback form on Apple&#8217;s site&#8221;</em>. This made me a bit angry, because I more and more got the feeling of him trying to simply get rid of me. I asked for someone who is more technically involved into the whole iPhone stuff and he answered with <em>&#8220;You&#8217;re already calling the most-advanced technical support &#8211; there&#8217;s no way to go further!&#8221;</em>. At this point total disappointment overcame me and the only thing I thought of saying before I would hang-up the phone was <em>&#8220;FAIL!&#8221;</em> &#8211; luckily I was behaving more polite than the support-guy himself. Eh.</p>
<p>The end of the story is, that I (once again) wrote a report via Apple&#8217;s Feedback form (which from my impression is saving the submitted content to /dev/null) and implemented a workaround for myself by renaming the &#8220;Authorization&#8221;-header to &#8220;Auth&#8221;. Yet again a scenario in which I&#8217;m feeling like talking to a wall of bricks and have no possibility to get any information regarding my problem or maybe even correct this sort of bug. I think, this is the other side of closed-source software.</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2009/10/23/iphone-safari-and-xmlhttprequest-authorization-headers/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

