URL Hash not included in Request Data Structure
Closed this issue · 3 comments
craig552uk commented
The URL hash fragment is not included in the request structure.
e.g.
curl localhost:3000/hello?a=b#c
When displaying the Request using elli_request:to_proplist(Req)
on the request_complete
event handler:
[{method,'GET'},
{path,[<<"hello">>]},
{args,[{<<"a">>,<<"b">>}]},
{raw_path,<<"/hello?a=b">>},
{version,{1,1}},
{headers,[{<<"Accept">>,<<"*/*">>},
{<<"Host">>,<<"localhost:3000">>},
{<<"User-Agent">>,<<"curl/7.38.0">>}]},
{body,<<>>},
{pid,<0.37.0>},
{socket,{plain,#Port<0.824>}},
{callback,{elli_hello_http,undefined}}
dantodor commented
I think this is the intended way all the modern browsers work, due to libraries like Angular or Ember use the hash in the address bar for defining internal routes.
knutin commented
Yes, @dantodor is right. The browsers don't actually send the fragment: https://en.wikipedia.org/wiki/Fragment_identifier
craig552uk commented
That, I did not know.
Thank you both and apologies for the unnecessary ticket.