1.2.0-rc
ktor-client-apache:1.2.0-rc
Oracle JDK 8, Open JDK 11
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.
Fragment part (everything after #) assumed to be client-side only, it never should be submitted to the server.
Hi @dtolstyi, the client shouldn't send the fragment part of URL as mentioned.
OK. Thank you for information @Prototik and @e5l. I don't know how it's being done in Chrome and FireFox but they do send this part.
Anyway, if you say that it shouldn't I believe you.
Thank you!
They never send this part. It requests page without fragment and process fragment at client-side later (via js or just by using anchors). In general server doesn't know anything about fragments, you should do your stuff by yourself.
Might be (post-processing via JS in my case). Thank you @Prototik for your explanation!
Most helpful comment
Fragment part (everything after
#) assumed to be client-side only, it never should be submitted to the server.