[99s-extend] query string with # sign

Loïc Hoguin essen at ninenines.eu
Fri Jul 26 18:42:41 CEST 2013


You have to encode the value (urlencode algorithm), some characters, 
like #, have a special meaning. Cowboy will urldecode automatically and 
give you the # you expect.

On 07/26/2013 06:39 PM, Samir Sow wrote:
>
> Actually my query is something like
>
> /path?=key=*value, value#&key=value2....
> But in the request i only receive the data before the # (the pound is removed)
>
>
> On 26 juil. 2013, at 18:25, Loïc Hoguin wrote:
>
>> /path/to/resource?f=value
>>
>> instead of
>>
>> /path/to/resource#value
>>
>> On 07/26/2013 06:25 PM, Samir Sow wrote:
>>> Thank you Loic
>>>
>>> I'm not http protocol fluent.
>>> Could you explain me what you mean by "you should use the query string for that" ?
>>>
>>> Samir
>>> On 26 juil. 2013, at 18:11, Loïc Hoguin wrote:
>>>
>>>> On 07/26/2013 06:08 PM, Samir Sow wrote:
>>>>> Hi,
>>>>>
>>>>> It seems that Cowboy removes the data after the # sign from the query string (GET) before handing the req to the handler.
>>>>> Is there any way to change this behavior ?
>>>>
>>>> Look for the commit that removed "cowboy_req:fragment/1".
>>>>
>>>> But be aware that #fragments aren't expected to be sent by an HTTP request and that browsers don't send it either. You probably should use the query string for that.
>>>>
>>>> --
>>>> Loïc Hoguin
>>>> Erlang Cowboy
>>>> Nine Nines
>>>> http://ninenines.eu
>>>
>>
>>
>> --
>> Loïc Hoguin
>> Erlang Cowboy
>> Nine Nines
>> http://ninenines.eu
>


-- 
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu



More information about the Extend mailing list