artanis
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Artanis] Which handler will be used when a path matches multiple ha


From: vimacs
Subject: Re: [Artanis] Which handler will be used when a path matches multiple handlers?
Date: Tue, 13 Mar 2018 09:19:40 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

I read the code yesterday and I found the handlers table is implemented
in hash map, so that I have no way to control which rule to use when
there are more than one rule matching the path. I also submitted an
issue about this:

  https://gitlab.com/NalaGinrut/artanis/issues/92

在 2018年03月12日 23:31, Joshua Branson 写道:
> I'm going to guess that the second one takes priority.
>
> Also,  what is the significance of ":who"  ?   Is the ":" treated specially?
>
> On Sun, Mar 11, 2018, at 7:38 PM, vimacs wrote:
>> Hello,
>>
>> When I write multiple handlers like:
>>
>> (get "/hello/:who" ...)
>>
>> (get "/.*" ...)
>>
>> Then which handler will be used when I visit
>> http://host:port/hello/world? From my testing, the second handler is
>> used no matter which handler I write first. What is the rule of priority
>> of the handlers?
>>
>>
>> Thanks
>>
>>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]