The old code was using internal knowledge of both what Pub references look like and how resolveRefToFile() works. The modified resolveRefToFile() can now handle both "package:..." and "/packages/..." references, so the request's path no longer needs massaging to make it work.