{"id":3864,"date":"2009-05-07T11:28:28","date_gmt":"2009-05-07T19:28:28","guid":{"rendered":"http:\/\/wapreview.com\/?p=3864"},"modified":"2009-05-07T11:28:28","modified_gmt":"2009-05-07T19:28:28","slug":"watch-out-for-this-openwave-redirection-bug","status":"publish","type":"post","link":"https:\/\/wapreview.com\/3864\/","title":{"rendered":"Watch Out For This Openwave Redirection Bug"},"content":{"rendered":"

\"404<\/p>\n

Back in the bad old days of WML,\u00a0 redirection bugs with mobile browsers and WAP gateways were pretty common. Mobile web developers were urged to avoid using redirection.\u00a0 If you think that’s no longer the case, think again.\u00a0 I found what I believe is a nasty redirection bug with Sprint\/Nextel’s iDen network. In spite of being really old technology and having a data rate of only 19.2 kbit\/s, iDen is interesting to mobile web developers, at least in the U.S., because it’s the network used by Sprint’s hot selling $50\/month Boost Mobile Unlimited Prepaid plan <\/a>which includes unlimited voice, SMS, Push to Talk and data<\/strong>.<\/p>\n

Wapreview.mobi traffic is up lately and I noticed that page load times have increased a bit.\u00a0 I decided to implement page caching to see if I can speed it up. I use browser detection and adapt page and image sizes for different classes of browsers. I divide browsers into four classes so there are four different versions of each page.<\/p>\n

Instead of generating each page on the fly for every request, I recently added some code to detect the browser and use a server side redirect to one of four different pre-built versions of the requested page.\u00a0 I used a query string parameter to specify each of the four page variants.\u00a0 So a request for http:\/\/wapreview.mobi is redirected to http:\/\/wapreview.mobi?sid=class<\/em>, where sid <\/em>is either wap, full, max<\/em> or ip <\/em>depending of the browser.\u00a0 I use PHP and Apache to send\u00a0 a 302\u00a0 “Found” header and\u00a0 specify the fully qualified path in the Location header which should <\/em>work in all browsers.<\/p>\n

Initially the new code seemed to be working well with a noticeable decrease in page load times and less load on the server.\u00a0 Unfortunately, I also noticed that I could not open wapreview.mobi with handsets on Sprint\/Nextel’s iDen network.\u00a0 With the iDen phones attempting to load any page on the site failed with a HTTP 404 “Not Found Error”<\/p>\n

I created some test pages with and without the redirection and also with redirection to different targets. I tested\u00a0 three different phones (i776, i355 and i9) on the iDen network at a local Sprint shop.\u00a0 With all three phones<\/p>\n