Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You want a real regexp for your route:</p> <pre><code>require 'sinatra' get %r{^/tileflood/?$}i do request.url + "\n" end </code></pre> <p>Proof:</p> <pre><code>smagic:~ phrogz$ curl http://localhost:4567/tileflood http://localhost:4567/tileflood smagic:~ phrogz$ curl http://localhost:4567/tIlEflOOd http://localhost:4567/tIlEflOOd smagic:~ phrogz$ curl http://localhost:4567/TILEFLOOD/ http://localhost:4567/TILEFLOOD/ smagic:~ phrogz$ curl http://localhost:4567/TILEFLOOD/z &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;style type="text/css"&gt; body { text-align:center;font-family:helvetica,arial;font-size:22px; color:#888;margin:20px} #c {margin:0 auto;width:500px;text-align:left} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;h2&gt;Sinatra doesn't know this ditty.&lt;/h2&gt; &lt;img src='/__sinatra__/404.png'&gt; &lt;div id="c"&gt; Try this: &lt;pre&gt;get '/TILEFLOOD/z' do "Hello World" end&lt;/pre&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; smagic:~ phrogz$ curl http://localhost:4567/tileflaad &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;style type="text/css"&gt; body { text-align:center;font-family:helvetica,arial;font-size:22px; color:#888;margin:20px} #c {margin:0 auto;width:500px;text-align:left} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;h2&gt;Sinatra doesn't know this ditty.&lt;/h2&gt; &lt;img src='/__sinatra__/404.png'&gt; &lt;div id="c"&gt; Try this: &lt;pre&gt;get '/tileflaad' do "Hello World" end&lt;/pre&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload