And here, the msg.get_uri ().get_fragment () does not contains any fragment.
But I also tried :
Uri uri = Uri.parse ("http://localhost:3000/#access_token=anaccesstokens&scope=user%3Aread%3Abroadcast&token_type=bearer", GLib.UriFlags.NONE);
debug (uri.get_fragment ());
And it’s working as expected since I get : access_token=anaccesstokens&scope=user:read:broadcast&token_type=bearer in my debug output.
So, is it an issue with Soup.Server or I missed an option somewhere ?
For log, after slightly updated the simple-httpd.c from official examples, to get the fragment part of the URI, I have the same issue.
So, maybe it’s an issue with the library…
Fragments are only used client side and do not get sent to the server as part of the request.
Fragments depend on the document MIME type and are evaluated by the client (web browser). Clients are not supposed to send URI fragments to servers when they retrieve a document.[1][2]
And you are completely right, indeed.
I completely forgotten that fragments URI are for client side - which make sense
But maybe it could be great to have, at least, a way to get the complete raw URI received by the server. (which include the fragment).
But, well, since I’ll use a WebView, I will be able to get the fragment with that easily.