Search code examples
c#httpgeckofx

Skybound GeckoFX set host field


For debugging I need to manipulate the host-field in HTTP-Request of the GeckoFX Webbrowser control. Does anyone know how I can do it?


Solution

  • OK, I got it. You have to set an additional header and than the host-header will be replaced. Example:

    geckoWebBrowser1.Navigate(urlTB.Text, Skybound.Gecko.GeckoLoadFlags.None, 
                              referrerTB.Text, null, string.Format("Host: {0}\r\n",
                              hostTB.Text));