vinipsmaker / tufao

An asynchronous web framework for C++ built on top of Qt
http://vinipsmaker.github.io/tufao/
GNU Lesser General Public License v2.1
589 stars 179 forks source link

incoming urls with # i.e http://localhost/#index.html #98

Closed jkayrouz closed 4 years ago

jkayrouz commented 4 years ago

The # sign omits the entire URL from the incoming HTTPServerRequest. I am unable to retrieve anything before t he # sign. Is there a workaround? I'm using the above url as an example.

vinipsmaker commented 4 years ago

Can you describe your problem in more detail?

jkayrouz commented 4 years ago

So, I eventually pursued another route. But, the problem I was experiencing is this. I was authenticating Twitch with OAuth. So, I would send a request to twitch, they would then prompt the user of my application to redirect to http://localhost:8080/#blahblahblah?access_token=XXXXX

So, when I received that OnRequestReady(request, response) with that URL, I would check the request's URL, and it was blank. I think anything after the "#" is ignored? I hope this helps. But, when I received a request to http://localhost:8080/blahblahblah?access_token=XXXXX (note, the # is not there), then everything worked fine and I was able to see all the parameters and the URL from the request.

vinipsmaker commented 4 years ago

I would check the request's URL, and it was blank. I think anything after the "#" is ignored?

Yup. Browser doesn't send anything that comes after the # sign. That's standard behaviour. That's — for instance — how mega managed to throw content responsibility on user behalf and escape anti-piracy laws.

jkayrouz commented 4 years ago

Thanks! I love your library by the way. Thank you.