krys-g/TrotiNet

Altering RequestHeaders.Referer is not possible?

Closed this issue · 2 comments

Hi krys-g,

First of all, thank you for your great work! It is fun to fiddle around with this nice code!

However I am stuck on one thing: I a trying to set the RequestHeaders.Referer to null. It seems it is not possible to alter it? I can successfully alter for example the RequestHeaders.Host value in the OnReceiveRequest function but not the Referer.

Can you tell me where this is possible?

For debugging I did also alter this line in HttpHeaders.cs: Referer = ParseStringValue("referer"); to: Referer = " https://google.com";.

But that did not work either. Are I am missing some point?

Hello forda2000,

Thanks for your message of support!

I am trying to set the RequestHeaders.Referer to null. It seems it is not possible to alter it? I can successfully alter for example the RequestHeaders.Host value in the OnReceiveRequest function but not the Referer.

What do you mean by not being possible to alter the Referer? I did the following test:

  • I added RequestHeaders.Referer = null; in e.g. Example/RedirectingProxy.cs::OnReceiveRequest()

  • I added System.Console.WriteLine(HeadersInOrder); in Lib/HttpHeaders.cs::SendTo() to see the headers being sent

    ⇒ The referer was no longer present.

(closing due to no answer)