<legend id='Gahp3'><style id='Gahp3'><dir id='Gahp3'><q id='Gahp3'></q></dir></style></legend>

      <small id='Gahp3'></small><noframes id='Gahp3'>

    1. <tfoot id='Gahp3'></tfoot>

        <bdo id='Gahp3'></bdo><ul id='Gahp3'></ul>
      <i id='Gahp3'><tr id='Gahp3'><dt id='Gahp3'><q id='Gahp3'><span id='Gahp3'><b id='Gahp3'><form id='Gahp3'><ins id='Gahp3'></ins><ul id='Gahp3'></ul><sub id='Gahp3'></sub></form><legend id='Gahp3'></legend><bdo id='Gahp3'><pre id='Gahp3'><center id='Gahp3'></center></pre></bdo></b><th id='Gahp3'></th></span></q></dt></tr></i><div id='Gahp3'><tfoot id='Gahp3'></tfoot><dl id='Gahp3'><fieldset id='Gahp3'></fieldset></dl></div>
    2. Response.Redirect 剥离 Header Referrer - 可以将其添加回来吗?

      Response.Redirect strips Header Referrer - Possible to Add it Back?(Response.Redirect 剥离 Header Referrer - 可以将其添加回来吗?)

      <i id='gAjmK'><tr id='gAjmK'><dt id='gAjmK'><q id='gAjmK'><span id='gAjmK'><b id='gAjmK'><form id='gAjmK'><ins id='gAjmK'></ins><ul id='gAjmK'></ul><sub id='gAjmK'></sub></form><legend id='gAjmK'></legend><bdo id='gAjmK'><pre id='gAjmK'><center id='gAjmK'></center></pre></bdo></b><th id='gAjmK'></th></span></q></dt></tr></i><div id='gAjmK'><tfoot id='gAjmK'></tfoot><dl id='gAjmK'><fieldset id='gAjmK'></fieldset></dl></div>
            <tfoot id='gAjmK'></tfoot>

            • <small id='gAjmK'></small><noframes id='gAjmK'>

                <bdo id='gAjmK'></bdo><ul id='gAjmK'></ul>
                <legend id='gAjmK'><style id='gAjmK'><dir id='gAjmK'><q id='gAjmK'></q></dir></style></legend>
                  <tbody id='gAjmK'></tbody>
              • 本文介绍了Response.Redirect 剥离 Header Referrer - 可以将其添加回来吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在使用 Response.Redirect 将用户重定向到另一台服务器以下载文件,而另一台服务器正在检查标头以确保它来自正确的服务器...但是似乎 Response.Redirect 剥离了标头来自响应.

                I'm using a Response.Redirect to redirect users to another server to download a file, and the other server is checking the header to ensure it came from the correct server... however it seems Response.Redirect strips the headers from the Response.

                有人知道我如何将标题添加回来吗?我试过了:

                Does anybody know how i can add the headers back? I've tried:

                Response.AddHeader("Referer", "www.domain.com");
                

                但是当我检查是否设置了 Referrer 标头时,接收页面测试为 false.

                But the receiving page tests false when i check if the Referrer header is set.

                除了显示一个供用户点击的按钮之外,我如何能得到这个工作的任何建议(我希望尽可能地对用户隐藏 url).

                Any suggestions how i can get this working, other than displaying a button for the user to click on (i'd like to keep the url hidden from the user as much as possible).

                推荐答案

                有一个 HTML hack 可用.

                There is an HTML hack available.

                <form action="http://url.goes.here" id="test" method="GET"></form>
                <script type="text/javascript">
                  document.getElementById("test").submit();
                </script>
                

                如果您需要从后面的代码中触发,也可以这样做:

                If you need to trigger that from a code behind, that can be done too:

                Response.Write( @"<form action='http://url.goes.here' id='test' method='GET'></form>
                                  <script type='text/javascript'>
                                     document.getElementById('test').submit();
                                  </script> ");
                

                正如 Inkel 可能指出的,这是对 Referer[sic] 规范的松散解释.它会做你想做的事.

                As Inkel might point out, that is a loose interpretation of the Referer[sic] spec. It will do what you want though.

                这篇关于Response.Redirect 剥离 Header Referrer - 可以将其添加回来吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Adding and removing users from Active Directory groups in .NET(在 .NET 中的 Active Directory 组中添加和删除用户)
                set equality in linq(在 linq 中设置相等)
                HashSet conversion to List(HashSet 转换为 List)
                How to set timeout for webBrowser navigate event(如何为 webBrowser 导航事件设置超时)
                Test whether two IEnumerablelt;Tgt; have the same values with the same frequencies(测试两个IEnumerablelt;Tgt;具有相同频率的相同值)
                How do you determine if two HashSets are equal (by value, not by reference)?(您如何确定两个 HashSet 是否相等(按值,而不是按引用)?)

                    <bdo id='oo025'></bdo><ul id='oo025'></ul>
                  • <i id='oo025'><tr id='oo025'><dt id='oo025'><q id='oo025'><span id='oo025'><b id='oo025'><form id='oo025'><ins id='oo025'></ins><ul id='oo025'></ul><sub id='oo025'></sub></form><legend id='oo025'></legend><bdo id='oo025'><pre id='oo025'><center id='oo025'></center></pre></bdo></b><th id='oo025'></th></span></q></dt></tr></i><div id='oo025'><tfoot id='oo025'></tfoot><dl id='oo025'><fieldset id='oo025'></fieldset></dl></div>
                      <tbody id='oo025'></tbody>

                    <small id='oo025'></small><noframes id='oo025'>

                    1. <tfoot id='oo025'></tfoot>
                      <legend id='oo025'><style id='oo025'><dir id='oo025'><q id='oo025'></q></dir></style></legend>