Jump to content

# in URLs results in HTTP 400 or 404

Recommended Posts

Delphi 2007, ICS 8.68, libssl-3. Adding "#" character to any URL results in HTTP error 400 or 404 response from server. I can reproduce it in the test applications easily - works every time 😞 For example, this URL works perfectly fine:




But adding "#" to the URL:




results in HTTP 400 error in ICS but works perfectly in any browser. Is there any way around this problem, because I need to send both GET and POST requests with # symbol in URLs?

Share this post

Link to post

# is an anchor, an instruction to the browser on how to display the page, it is never sent to the server as part of the URL by a browser.  Your application should create a valid URL by removing the #.  ICS does not validate the URL for illegal content. 



  • Like 1

Share this post

Link to post

It used to work in Indy, so I thought it'll work in ICS too. Indy must have been removing the # part of the URLs silently. Thank you for your help, Angus.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now