I click the link from view/game/game_list.html, My html is:
    <div class="col-sm-{{ col_num }}">
      <div class="thumbnail">
        <a href="/game/subject/{{ game.id }}">
          <img src="/static/img/game_logo/{{ game.id }}.png">
          <div class="text-center">
            <span>{{ game.name }}</span>
          </div>
        </a>
      </div>
    </div>

And the controller's code:
-module(yxq_game_controller, [Req]).
-compile(export_all).
-include("yxq.hrl").  
-include("deps/mysql/src/mysql.hrl").
-include("deps/simple_bridge/include/simple_bridge.hrl").

before_(Action, Arg1, Arg2) ->
    ?TRACE_VAR(Req:header(http_referer)),
    ?TRACE_VAR(Req:header(referer)),

And the print result is:
******
Module: yxq_game_controller, Line: 41, 
My print's "Req : header ( http_referer )" is undefined
******

******
Module: yxq_game_controller, Line: 41, 
My print's "Req : header ( referer )" is 
"http://localhost:8006/game/subject/1";
******
11:50:51.680 [notice] Request Method: 'POST', Tokens: []

Req:header(http_referer) is undefined, Req:header(referer) is current url, 
not http://localhost:8006/game/game_list

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/e8324b37-14be-4065-8870-fa518821574a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to