title: iPad: [[NSURL absoluteURL]pathExtension] not available in 3.2
body: <p>I am porting some code over to the iPad and targeting 3.2.  I'm using some 4.0 exclusive code in the -pathExtension method of NSURL.  </p>
  
  <p>I handle all web requests differently depending on what the hyperlink points to.  Was there a way to do this before 4.0 came out, or am I just stuck reading the last 4 characters of the URL string with NSRange?</p>
  
  <p>I'm trying to differentiate between .png and .jpg files, if a user wants to browse to either I handle it differently.</p>
  
  <p>This is what I'm doing now but looking for a better way:</p>
  
  <pre><code>NSString *path = [[[request URL]absoluteURL]path];
  NSInteger pathLength = [path length];
  NSInteger lengthToPeriod = pathLength - 3;
  NSRange extensionRange = NSMakeRange(lengthToPeriod,3);
  NSString *extension = [path substringWithRange:extensionRange];
  </code></pre>