RTC Forums
November 27, 2024, 09:13:25 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Get fragment part (#) of URI from TRtcServerRequest  (Read 4489 times)
GeirBerg
RTC License+
****
Posts: 13


« on: May 27, 2015, 11:46:55 AM »

Hi.

We need to extract and validate some GET parameters from a request but are unable to do so since it seems that anything that comes after a fragment identifier (#) in a URI is not available in any of the usual properties (URI, FileName, Query.Text, Params.Text, etc.).

So how do we get access to the complete (original) URI so that we can parse it?

Here is an example of an URI with a fragment:

https://<server:port>/index.html#/login?customerid=123&userid=abc&password=secret&...

Without the # we can easily extract the value with Query[...] or Query.Text

Thank you in advance!
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: May 28, 2015, 08:24:41 AM »

What you are probably looking for is the "Referer" parameter in the HTTP Header (accessible through Request['Referer'] or the Request.Referer property). The referer is extracted by the WebBrowser from the fragment part of the URI contained in a HTML page, but you can NOT simply enter an URL with a fragment part into the Address line of a WebBrowser for testing, because most WebBrowsers will simply cut off anything behind '#' when entered directly into the Address line.

Best Regards,
Danijel Tkalcec
Logged
GeirBerg
RTC License+
****
Posts: 13


« Reply #2 on: May 28, 2015, 08:39:14 AM »

Hmm. I'm sure you're right. We were hoping to detect old client versions based on certain parameters, but since the client uses an embedded Chromium webbrowser it seems that fragment parts are never sent. I see now that this is by design (RFC spec?) in all browsers. So I guess we'll have to find another way.

UPDATE: I think you updated your answer while I was writing a reply. However, the "Referer" property does not seem to help in this case. What you say regarding browsers seems to match with my findings.

Anyway, thank you for your reply.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.023 seconds with 16 queries.