All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.scalatra.UriDecoder.scala Maven / Gradle / Ivy

The newest version!
package org.scalatra

import rl.UrlCodingUtils

object UriDecoder {

  def firstStep(uri: String): String = {
    UrlCodingUtils.urlDecode(
      toDecode = UrlCodingUtils.ensureUrlEncoding(uri),
      toSkip = PathPatternParser.PathReservedCharacters)
  }

  def secondStep(uri: String): String = {
    uri.replaceAll("%23", "#")
      .replaceAll("%2F", "/")
      .replaceAll("%3F", "?")
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy