From c807880f7ac73f813b2660ea81a00f7712a4e793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 29 Aug 2016 12:39:49 +0200 Subject: Add old mailing list archives --- .../archives/extend/2015-January/000503.html | 97 ++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 _build/static/archives/extend/2015-January/000503.html (limited to '_build/static/archives/extend/2015-January/000503.html') diff --git a/_build/static/archives/extend/2015-January/000503.html b/_build/static/archives/extend/2015-January/000503.html new file mode 100644 index 00000000..4ed34cd0 --- /dev/null +++ b/_build/static/archives/extend/2015-January/000503.html @@ -0,0 +1,97 @@ + + + + [99s-extend] Rewriting URLs + + + + + + + + + + +

[99s-extend] Rewriting URLs

+ Paul Dickson + pdtwonotes at gmail.com +
+ Tue Jan 27 14:07:48 CET 2015 +

+
+ +
On Tue, 2015-01-27 at 11:13 +0100, Loïc Hoguin wrote:
+> On 01/26/2015 10:54 PM, Paul Dickson wrote:
+> > On Mon, 2015-01-26 at 11:26 +0100, Loïc Hoguin wrote:
+> >> You have to change path_info too if your middleware is after the router.
+> >>
+> > I have added that.  My cowboy:start_http parameters include this:
+> >      {middlewares, [cowboy_router, bz_libmap, cowboy_handler]}
+> > which I think means bz_libmap will get called on *every* request.  This
+> > seems to work.  Among the dispatch rules is this line:
+> >      {"/music/[...]", cowboy_static, {dir, "", ""}},
+> 
+> Is it the actual line? Cause {dir, "", ""} is wrong, the third element 
+> must be an etag or mimetype tuple.
+> 
+> Otherwise, I need a more complete error, or code.
+
+I changed the rule line to:
+
+	    {"/music/[...]", cowboy_static, {dir, "", [
+	        {mimetypes, cow_mimetypes, all}]}},
+
+The client I am using is 'mplayer'.  The error message is:
+
+  Server returned 400:Bad Request
+  Failed to parse header.
+  Failed, exiting.
+
+I also included some tracing in my middleware module to print
+out the new path and path_info values it is setting, showing
+the result of the rewrite algorithm.
+
+ Path <<"/music/Library/Folk/Swiss/Alphorn.ogg">>
+ Info [<<"/">>,<<"music">>,<<"Library">>,<<"Folk">>,<<"Swiss">>,
+         <<"Alphorn.ogg">>]
+
+
+
+ + + +
+

+ +
+More information about the Extend +mailing list
+ -- cgit v1.2.3