# in URL / URI

Document ID : KB000011822
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

When the URL / URI contains a # character, CA Single SignOn (SiteMinder) is not able to process this URL / URI.
The URL gets truncated if # is present in it.

Question:

How does CA Single Sign On (SiteMinder) handle a # in the URL / URI? Is this a problem with CA Single Sign-On OR a problem with the Agent?

Environment:
Any release of CA Single Sign-On on any of the supported Operating System. As of this writing R12.52 SP01 CR06 has been released, hence this document is valid for releases upto and including R12.52 SP01 CR06
Answer:

# Character - This is considered as an Usafe Character

More about “unsafe” characters from RFC1738:

All unsafe characters must always be encoded within a URL. For example, the character “#” must be encoded within URLs even in systems that do not normally deal with fragment or anchor identifiers, so that if the URL is copied into another system that does use them, it will not be necessary to change the URL encoding.

Any information that appears after the first hash symbol in a URL is referred to as the fragment identifier – sometimes also called an anchor tag. By default, the fragment identifier is interpreted only by the local web browser and is typically not passed to the remote web server. For example, the following two links would both be considered requests for the same document by the web server:

www.example.com/fruits.html#apple
www.example.com/fruits.html#orange

This may be the problem with the URI syntax, "#" is considered a sign of end of url, so if you put it as part of an url it just considers as a termination character and it does not understand it.

So in the above examples, When you access the above URLs, Web browser truncates it and send like below to the web server.

www.example.com/fruits.html
www.example.com/fruits.html

So when the request go to the web agent which does not contain "#" in the resource itself.  Hence agent is not modifying or truncating the request here.

As per the above information, the problem of URL getting truncated is not due to Web agent, But the Web Browser (URI syntax) itself considering it as end of URL and ignore whatever present after the "#".

Additional Information:

Please refer below link for more details on URI syntax.

https://tools.ietf.org/html/rfc3986