0

Is there any restrictions as to which characters are allowed in URL?

For example such string:

http://localhost:8080/auth.dll?[session_id]={762308e9-9c89-47d2-b68f-220dedd0631a}

Could it be allowed with chars: [, ], {, }

?

Secret
  • 2,627
  • 7
  • 32
  • 46

1 Answers1

2

You can use [] but not {}. If you want the latter in your URL you have to encode them. Use %7b in place of { and %7d in place of }.

That said, some browsers might not like [] either so you can encode them as well. I would, however, consider why you want to use possible array delineators in a variable name and if you can avoid doing it them do so. Even if it parses correctly there are some additional problems with the server that receives this query string.