question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Part of URL after hash sign (#) is removed during the request

See original GitHub issue

Ktor Version

1.2.0-rc

Ktor Engine Used(client or server and name)

ktor-client-apache:1.2.0-rc

JVM Version, Operating System and Relevant Context

Oracle JDK 8, Open JDK 11

Feedback

When trying to open an URL with # sign in URL the part after hash is completely removed

Example:

val response = client.call("https://google.com#test") {
        method = HttpMethod.Get
}.response

Actual request is going to be made to https://google.com page instead of https://google.com#test.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Prototikcommented, Jun 12, 2019

Fragment part (everything after #) assumed to be client-side only, it never should be submitted to the server.

0reactions
dtolstyicommented, Jun 13, 2019

Might be (post-processing via JS in my case). Thank you @Prototik for your explanation!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is the hash part of the URL not available on the server ...
Explanation: Basically the hash component of the page URL (the part following the # sign) is processed by the browser only - the...
Read more >
read url hash (#) part in server side - MSDN - Microsoft
I excepted that Request.Url.Fragment returns "main" in this case, but it returns allways an empty string. I search a lot and in the...
Read more >
URI fragment - Wikipedia
The fragment identifier introduced by a hash mark # is the optional last part of a URL for a document. It is typically...
Read more >
Use pound sign or hash mark in click-through - Studio Help
In a URL, a hash mark, number sign, or pound sign ( # ) points a browser to a specific spot in a...
Read more >
URL location hash being cleared when it isn't authentication ...
What's happening is that the application domain session cookie okta-oauth-redirect-params is set from a previous instance of the application ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found