rgrinberg / opium

Sinatra like web toolkit for OCaml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

static middleware does not handle http parameters

Chimrod opened this issue · comments

After migrating my project to the new update (you did a great job, and I like the new organization for the library), I notice that the middleware static_unix return a 404 error on requests with a parameter. For exemple:

http://localhost:3000/favicon.ico works, but
http://localhost:3000/favicon.ico?test does not.

In a real exemple, this block the usage of font-awesome as the css declare the url with parameters:

@font-face {
  font-family: 'FontAwesome';
  src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');
  src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
  …
}