<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div><div class="h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>&gt;&gt; While the above explanation makes sense, and understanding it can lead to<br>

&gt;&gt; designing applications better, my gut feeling is with Rick. If I create a<br>
&gt;&gt; &#39;before&#39; hook, I want it normally to fire once everything the human user makes a<br>
&gt;&gt; request even though under the scene the browser is making multiple requests. In<br>
&gt;&gt; other words, the current behavior seems to be against the DWIM nature that I<br>
&gt;&gt; would expect.<br></div></div></blockquote></div></div></div></div></div></blockquote><div><br></div><div style>I don&#39;t think I would agree here. Let me elaborate on my point of view:</div><div style><br></div>
<div style>Dancer is a DSL to write a web application. Its purpose is to provide a clean and intuitive syntax for describing how to handle a request and which response to produce. This is based of course on the HTTP protocol, and Dancer relies entirely on that.</div>
<div style><br></div><div style>That means that everything in Dancer&#39;s point of view is related to an incoming _request_. In the HTTP meaning. If Chrome hits favicon.ico whenever you hit the app, you&#39;ll send 2 requests every time you hit the browser&#39;s reload button. You are sending 2 requests, period.</div>
<div style><br></div><div style>Dancer sees 2 requests, and acts accordingly.</div><div style><br></div><div style>Implementing a workaround to simulate the concept of &quot;human requests&quot; versus real &quot;HTTP requests&quot; sounds crazy to me and error-prone.</div>
<div style><br></div><div style>What makes Dancer so appealing is its thin layer over the HTTP stack, this kind of change or enhancement is dangerous, I think.</div><div style><br></div><div style>I&#39;m sorry if I&#39;m not following you on this one, I hope you see my point of view :)</div>
<div style><br></div><div style>Cheers</div></div></div></div>