"Greater than" and "Lesser than" symbols in URL not working "Greater than" and "Lesser than" symbols in URL not working apache apache

"Greater than" and "Lesser than" symbols in URL not working


Replace > by %3E

and replace < by %3C

verified and working.


Try using character entities to escape those characters?:

http://localhost:8080/ApplicationX/FileY/UpdateDocument(`<add location="somewhere">ContentZ</add>`).xml?VIEW=RAW


You need to URLencode your URL, if you want to avoid such problems.

    String UrlEncode(String value)    {        StringBuilder result = new StringBuilder();        foreach (char symbol in value)        {            if ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~".IndexOf(symbol) != -1) result.Append(symbol);            else result.Append("%u" + String.Format("{0:X4}", (int)symbol));        }        return result.ToString();    }

The above supports unicode, and pretty much everything.