diff options
Diffstat (limited to '_build/static/archives/extend/attachments/20150623')
10 files changed, 1652 insertions, 0 deletions
diff --git a/_build/static/archives/extend/attachments/20150623/3556788c/attachment-0001.html b/_build/static/archives/extend/attachments/20150623/3556788c/attachment-0001.html new file mode 100644 index 00000000..82ea0504 --- /dev/null +++ b/_build/static/archives/extend/attachments/20150623/3556788c/attachment-0001.html @@ -0,0 +1,203 @@ +<tt> +<div dir="ltr">It's bitten me a few times :(</div><div class="gmail_extra"><br><div class="gmail_quote">On 23 June 2015 at 10:09, Loïc Hoguin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Oh nice catch ahah. We should probably warn when something like this happens.<span class=""><br><br> +<br><br> +On 06/23/2015 11:06 AM, Graham Hay wrote:<br><br> +</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br> +I think the order of your routes is the problem, try putting this line<br></span><br> +<<a href="https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17</a>><span class=""><br><br> +last.<br><br> +<br><br> +On 23 June 2015 at 09:56, Loïc Hoguin <<a href="mailto:[email protected]" target="_blank">[email protected]</a><br></span><div><div class="h5"><br> +<mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>>> wrote:<br><br> +<br><br> + The {error, enoent}, especially there, is probably just because the<br><br> + browser is trying to fetch the favicon.<br><br> +<br><br> + Your issue is that Websocket won't connect, so it has nothing to do<br><br> + with cowboy_rest. Try tracing cowboy_websocket or enable SASL to<br><br> + have more info.<br><br> +<br><br> +<br><br> + On 06/23/2015 10:28 AM, Robert Balogh wrote:<br><br> +<br><br> + hello,<br><br> +<br><br> + First of all I would say I am a beginner in Cowboy web server, so<br><br> + probably I made something wrong, that is why I got the "fault",<br><br> + what I got.<br><br> +<br><br> + I would like to build up web page, where the client can<br><br> + communicate to<br><br> + server, and server can do the same to client, if client does not<br><br> + send<br><br> + anything to server too. The Cowboy has the websocket example,<br><br> + what does<br><br> + what I would like to do.<br><br> +<br><br> + There is only one thing is missing what I would like to have.<br><br> + This is<br><br> + the "frameset". My idea is to build the index.html using framsets. I<br><br> + made this changes, and I build up the html files for the frames,<br><br> + and of<br><br> + course I set these in the index.html.<br><br> +<br><br> + Here is how the index.html looks like<br><br> + <html><br><br> +<br><br> + <head><br><br> + <title>Welcome to Websocket example 2</title><br><br> + </head><br><br> +<br><br> + <frameset rows="64,*"><br><br> + <frame name="top_frame" noresize="noresize" scrolling="no"<br><br> + src="frame_top.html"><br><br> + <frameset cols="450,*"><br><br> + <frame name="left_frame" scrolling="auto"<br><br> + src="frame_left.html"><br><br> + <frame name="right_frame" src="frame_right.html"><br><br> + </frameset><br><br> + <noframes><br><br> + <body><br><br> +<br><br> + </body><br><br> + </noframes><br><br> + </frameset><br><br> +<br><br> + </html><br><br> +<br><br> + This is how the priv folder looks like<br><br> + -----------------------------------------------------------<br><br> + ls priv/<br><br> + frame_left.html frame_right.html frame_top.html<br><br> + index.html static<br><br> +<br><br> + This is how I changed the websocket_2_app:start/2 function<br><br> + -----------------------------------------------------------<br><br> + Dispatch = cowboy_router:compile([<br><br> + {'_', [<br><br> +<br><br> + {"/", cowboy_static, {priv_file, websocket_2,<br><br> + "index.html"}},<br><br> + {"/[...]", cowboy_static, {priv_dir, websocket_2,<br><br> + ""}},<br><br> +<br><br> + {"/websocket_2", ws_handler_2, []},<br><br> + {"/static/[...]", cowboy_static, {priv_dir,<br><br> + websocket_2,<br><br> + "static"}}<br><br> + ]}<br><br> + ]),<br><br> +<br><br> + After compile and make release package of the app, I can reach the<br><br> + webserver on the port 8080, but some connection does not set up<br><br> + correctly. The following texts are present in the browser<br><br> + DISCONNECTED<br><br> +<br><br> + ERROR: undefined<br><br> +<br><br> + Connecting to: ws://localhost:8080/websocket_2<br><br> +<br><br> + I made a dbg trace on all cowboy modules, to start some kind of<br><br> + troubleshooting. In the "tons" of printout I can see this one.<br><br> + So in the<br><br> + bottom of this, there is an {error,enoent}. It comes when tries<br><br> + connect<br><br> + to the socket. But unfortunatelly I do not have idea what may<br><br> + cause this :-(<br><br> +<br><br> + The part of trace<br><br> + -----------------------------------------------------------<br><br> + (<0.177.0>) call<br><br> + cowboy_rest:next({http_req,#Port<0.646>,ranch_tcp,keepalive,<0.177.0>,<<"GET">>,'HTTP/1.1',<br><br> + {{127,0,0,1},33241},<br><br> + <<"localhost">>,undefined,8080,<<"/websocket_2">>,<br><br> + [<<"websocket_2">>],<br><br> + <<>>,undefined,[],<br><br> + [{<<"host">>,<<"localhost:8080">>},<br><br> + {<<"connection">>,<<"Upgrade">>},<br><br> + {<<"pragma">>,<<"no-cache">>},<br><br> + {<<"cache-control">>,<<"no-cache">>},<br><br> + {<<"upgrade">>,<<"websocket">>},<br><br> + {<<"origin">>,<<"<a href="http://localhost:8080" rel="noreferrer" target="_blank">http://localhost:8080</a>">>},<br><br> + {<<"sec-websocket-version">>,<<"13">>},<br><br> + {<<"user-agent">>,<br><br> + <<"Mozilla/5.0 (X11; Linux i686)<br><br> + AppleWebKit/537.36<br><br> + (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36">>},<br><br> + {<<"accept-encoding">>,<<"gzip, deflate, sdch">>},<br><br> + {<<"accept-language">>,<<"en-US,en;q=0.8">>},<br><br> +<br><br> + {<<"sec-websocket-key">>,<<"by/gwaQvb/51W7Wa9zrGQg==">>},<br><br> + {<<"sec-websocket-extensions">>,<br><br> + <<"permessage-deflate;<br><br> + client_max_window_bits">>}],<br><br> + [{<<"connection">>,[<<"upgrade">>]}],<br><br> +<br><br> + undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,undefined},{state,[{handler,cowboy_static},<br><br> + {handler_opts,{priv_dir,websocket_2,[]}},<br><br> + {listener,http},<br><br> + {dispatch,[{'_',[],<br><br> + [{[],[],cowboy_static,<br><br> +<br><br> + {priv_file,websocket_2,"index.html"}},<br><br> +<br><br> + {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}},<br><br> +<br><br> + {[<<"websocket_2">>],[],ws_handler_2,[]},<br><br> + {[<<"static">>,'...'],<br><br> + [],cowboy_static,<br><br> +<br><br> + {priv_dir,websocket_2,"static"}}]}]}],<br><br> + <<"GET">>,cowboy_static,<br><br> +<br><br> + {<<"/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2">>,<br><br> + {error,enoent},<br><br> + []},<br><br> +<br><br> + undefined,[],undefined,[],undefined,[],undefined,false,undefined,<br><br> + undefined,undefined},#Fun<cowboy_rest.2.41839999>)<br><br> + (Timestamp: {1435,<br><br> +<br><br> + 46126,<br><br> +<br><br> + 935663})<br><br> +<br><br> + I guess, I did something very wrong, but I did not found what is<br><br> + that,<br><br> + thus I would like to get some help from you.<br><br> +<br><br> + Please find my small project in github:<br><br> + <a href="https://github.com/ethrbh/websocket_2" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2</a><br><br> +<br><br> + thanks for your help,<br><br> + /Robi<br><br> +<br><br> +<br><br> +<br><br> + _______________________________________________<br><br> + Extend mailing list<br></div></div><br> + <a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><span class=""><br><br> + <a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br><br> +<br><br> +<br><br> + --<br><br> + Loïc Hoguin<br><br> + <a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br><br> + Author of The Erlanger Playbook,<br><br> + A book about software development using Erlang<br><br> + _______________________________________________<br><br> + Extend mailing list<br></span><br> + <a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><br><br> + <a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br><br> +<br><br> +<br><br> +</blockquote><div class="HOEnZb"><div class="h5"><br> +<br><br> +-- <br><br> +Loïc Hoguin<br><br> +<a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br><br> +Author of The Erlanger Playbook,<br><br> +A book about software development using Erlang<br><br> +</div></div></blockquote></div><br></div><br> + +</tt> diff --git a/_build/static/archives/extend/attachments/20150623/3556788c/attachment.html b/_build/static/archives/extend/attachments/20150623/3556788c/attachment.html new file mode 100644 index 00000000..82ea0504 --- /dev/null +++ b/_build/static/archives/extend/attachments/20150623/3556788c/attachment.html @@ -0,0 +1,203 @@ +<tt> +<div dir="ltr">It's bitten me a few times :(</div><div class="gmail_extra"><br><div class="gmail_quote">On 23 June 2015 at 10:09, Loïc Hoguin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Oh nice catch ahah. We should probably warn when something like this happens.<span class=""><br><br> +<br><br> +On 06/23/2015 11:06 AM, Graham Hay wrote:<br><br> +</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br> +I think the order of your routes is the problem, try putting this line<br></span><br> +<<a href="https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17</a>><span class=""><br><br> +last.<br><br> +<br><br> +On 23 June 2015 at 09:56, Loïc Hoguin <<a href="mailto:[email protected]" target="_blank">[email protected]</a><br></span><div><div class="h5"><br> +<mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>>> wrote:<br><br> +<br><br> + The {error, enoent}, especially there, is probably just because the<br><br> + browser is trying to fetch the favicon.<br><br> +<br><br> + Your issue is that Websocket won't connect, so it has nothing to do<br><br> + with cowboy_rest. Try tracing cowboy_websocket or enable SASL to<br><br> + have more info.<br><br> +<br><br> +<br><br> + On 06/23/2015 10:28 AM, Robert Balogh wrote:<br><br> +<br><br> + hello,<br><br> +<br><br> + First of all I would say I am a beginner in Cowboy web server, so<br><br> + probably I made something wrong, that is why I got the "fault",<br><br> + what I got.<br><br> +<br><br> + I would like to build up web page, where the client can<br><br> + communicate to<br><br> + server, and server can do the same to client, if client does not<br><br> + send<br><br> + anything to server too. The Cowboy has the websocket example,<br><br> + what does<br><br> + what I would like to do.<br><br> +<br><br> + There is only one thing is missing what I would like to have.<br><br> + This is<br><br> + the "frameset". My idea is to build the index.html using framsets. I<br><br> + made this changes, and I build up the html files for the frames,<br><br> + and of<br><br> + course I set these in the index.html.<br><br> +<br><br> + Here is how the index.html looks like<br><br> + <html><br><br> +<br><br> + <head><br><br> + <title>Welcome to Websocket example 2</title><br><br> + </head><br><br> +<br><br> + <frameset rows="64,*"><br><br> + <frame name="top_frame" noresize="noresize" scrolling="no"<br><br> + src="frame_top.html"><br><br> + <frameset cols="450,*"><br><br> + <frame name="left_frame" scrolling="auto"<br><br> + src="frame_left.html"><br><br> + <frame name="right_frame" src="frame_right.html"><br><br> + </frameset><br><br> + <noframes><br><br> + <body><br><br> +<br><br> + </body><br><br> + </noframes><br><br> + </frameset><br><br> +<br><br> + </html><br><br> +<br><br> + This is how the priv folder looks like<br><br> + -----------------------------------------------------------<br><br> + ls priv/<br><br> + frame_left.html frame_right.html frame_top.html<br><br> + index.html static<br><br> +<br><br> + This is how I changed the websocket_2_app:start/2 function<br><br> + -----------------------------------------------------------<br><br> + Dispatch = cowboy_router:compile([<br><br> + {'_', [<br><br> +<br><br> + {"/", cowboy_static, {priv_file, websocket_2,<br><br> + "index.html"}},<br><br> + {"/[...]", cowboy_static, {priv_dir, websocket_2,<br><br> + ""}},<br><br> +<br><br> + {"/websocket_2", ws_handler_2, []},<br><br> + {"/static/[...]", cowboy_static, {priv_dir,<br><br> + websocket_2,<br><br> + "static"}}<br><br> + ]}<br><br> + ]),<br><br> +<br><br> + After compile and make release package of the app, I can reach the<br><br> + webserver on the port 8080, but some connection does not set up<br><br> + correctly. The following texts are present in the browser<br><br> + DISCONNECTED<br><br> +<br><br> + ERROR: undefined<br><br> +<br><br> + Connecting to: ws://localhost:8080/websocket_2<br><br> +<br><br> + I made a dbg trace on all cowboy modules, to start some kind of<br><br> + troubleshooting. In the "tons" of printout I can see this one.<br><br> + So in the<br><br> + bottom of this, there is an {error,enoent}. It comes when tries<br><br> + connect<br><br> + to the socket. But unfortunatelly I do not have idea what may<br><br> + cause this :-(<br><br> +<br><br> + The part of trace<br><br> + -----------------------------------------------------------<br><br> + (<0.177.0>) call<br><br> + cowboy_rest:next({http_req,#Port<0.646>,ranch_tcp,keepalive,<0.177.0>,<<"GET">>,'HTTP/1.1',<br><br> + {{127,0,0,1},33241},<br><br> + <<"localhost">>,undefined,8080,<<"/websocket_2">>,<br><br> + [<<"websocket_2">>],<br><br> + <<>>,undefined,[],<br><br> + [{<<"host">>,<<"localhost:8080">>},<br><br> + {<<"connection">>,<<"Upgrade">>},<br><br> + {<<"pragma">>,<<"no-cache">>},<br><br> + {<<"cache-control">>,<<"no-cache">>},<br><br> + {<<"upgrade">>,<<"websocket">>},<br><br> + {<<"origin">>,<<"<a href="http://localhost:8080" rel="noreferrer" target="_blank">http://localhost:8080</a>">>},<br><br> + {<<"sec-websocket-version">>,<<"13">>},<br><br> + {<<"user-agent">>,<br><br> + <<"Mozilla/5.0 (X11; Linux i686)<br><br> + AppleWebKit/537.36<br><br> + (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36">>},<br><br> + {<<"accept-encoding">>,<<"gzip, deflate, sdch">>},<br><br> + {<<"accept-language">>,<<"en-US,en;q=0.8">>},<br><br> +<br><br> + {<<"sec-websocket-key">>,<<"by/gwaQvb/51W7Wa9zrGQg==">>},<br><br> + {<<"sec-websocket-extensions">>,<br><br> + <<"permessage-deflate;<br><br> + client_max_window_bits">>}],<br><br> + [{<<"connection">>,[<<"upgrade">>]}],<br><br> +<br><br> + undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,undefined},{state,[{handler,cowboy_static},<br><br> + {handler_opts,{priv_dir,websocket_2,[]}},<br><br> + {listener,http},<br><br> + {dispatch,[{'_',[],<br><br> + [{[],[],cowboy_static,<br><br> +<br><br> + {priv_file,websocket_2,"index.html"}},<br><br> +<br><br> + {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}},<br><br> +<br><br> + {[<<"websocket_2">>],[],ws_handler_2,[]},<br><br> + {[<<"static">>,'...'],<br><br> + [],cowboy_static,<br><br> +<br><br> + {priv_dir,websocket_2,"static"}}]}]}],<br><br> + <<"GET">>,cowboy_static,<br><br> +<br><br> + {<<"/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2">>,<br><br> + {error,enoent},<br><br> + []},<br><br> +<br><br> + undefined,[],undefined,[],undefined,[],undefined,false,undefined,<br><br> + undefined,undefined},#Fun<cowboy_rest.2.41839999>)<br><br> + (Timestamp: {1435,<br><br> +<br><br> + 46126,<br><br> +<br><br> + 935663})<br><br> +<br><br> + I guess, I did something very wrong, but I did not found what is<br><br> + that,<br><br> + thus I would like to get some help from you.<br><br> +<br><br> + Please find my small project in github:<br><br> + <a href="https://github.com/ethrbh/websocket_2" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2</a><br><br> +<br><br> + thanks for your help,<br><br> + /Robi<br><br> +<br><br> +<br><br> +<br><br> + _______________________________________________<br><br> + Extend mailing list<br></div></div><br> + <a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><span class=""><br><br> + <a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br><br> +<br><br> +<br><br> + --<br><br> + Loïc Hoguin<br><br> + <a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br><br> + Author of The Erlanger Playbook,<br><br> + A book about software development using Erlang<br><br> + _______________________________________________<br><br> + Extend mailing list<br></span><br> + <a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><br><br> + <a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br><br> +<br><br> +<br><br> +</blockquote><div class="HOEnZb"><div class="h5"><br> +<br><br> +-- <br><br> +Loïc Hoguin<br><br> +<a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br><br> +Author of The Erlanger Playbook,<br><br> +A book about software development using Erlang<br><br> +</div></div></blockquote></div><br></div><br> + +</tt> diff --git a/_build/static/archives/extend/attachments/20150623/69dfc8e4/attachment-0001.html b/_build/static/archives/extend/attachments/20150623/69dfc8e4/attachment-0001.html new file mode 100644 index 00000000..afae15ff --- /dev/null +++ b/_build/static/archives/extend/attachments/20150623/69dfc8e4/attachment-0001.html @@ -0,0 +1,4 @@ +<tt> +<div dir="ltr">hello,<br><br>First of all I would say I am a beginner in Cowboy web server, so probably I made something wrong, that is why I got the "fault", what I got.<br><br>I would like to build up web page, where the client can communicate to server, and server can do the same to client, if client does not send anything to server too. The Cowboy has the websocket example, what does what I would like to do.<br><br>There is only one thing is missing what I would like to have. This is the "frameset". My idea is to build the index.html using framsets. I made this changes, and I build up the html files for the frames, and of course I set these in the index.html. <br><br>Here is how the index.html looks like<br> <html><br><br> <head><br> <title>Welcome to Websocket example 2</title><br> </head><br><br> <frameset rows="64,*"><br> <frame name="top_frame" noresize="noresize" scrolling="no" src="frame_top.html"><br> <frameset cols="450,*"><br> <frame name="left_frame" scrolling="auto" src="frame_left.html"><br> <frame name="right_frame" src="frame_right.html"><br> </frameset><br> <noframes><br> <body><br><br> </body><br> </noframes><br> </frameset><br><br> </html><br><br>This is how the priv folder looks like<br>-----------------------------------------------------------<br> ls priv/<br> frame_left.html frame_right.html frame_top.html index.html static<br><br>This is how I changed the websocket_2_app:start/2 function<br>-----------------------------------------------------------<br> Dispatch = cowboy_router:compile([<br> {'_', [<br> <br> {"/", cowboy_static, {priv_file, websocket_2, "index.html"}},<br> {"/[...]", cowboy_static, {priv_dir, websocket_2, ""}},<br> <br> {"/websocket_2", ws_handler_2, []},<br> {"/static/[...]", cowboy_static, {priv_dir, websocket_2, "static"}}<br> ]}<br> ]),<br><br>After compile and make release package of the app, I can reach the webserver on the port 8080, but some connection does not set up correctly. The following texts are present in the browser<br> DISCONNECTED<br><br> ERROR: undefined<br><br> Connecting to: ws://localhost:8080/websocket_2<br><br>I made a dbg trace on all cowboy modules, to start some kind of troubleshooting. In the "tons" of printout I can see this one. So in the bottom of this, there is an {error,enoent}. It comes when tries connect to the socket. But unfortunatelly I do not have idea what may cause this :-(<br><br>The part of trace<br>-----------------------------------------------------------<br> (<0.177.0>) call cowboy_rest:next({http_req,#Port<0.646>,ranch_tcp,keepalive,<0.177.0>,<<"GET">>,'HTTP/1.1',<br> {{127,0,0,1},33241},<br> <<"localhost">>,undefined,8080,<<"/websocket_2">>,<br> [<<"websocket_2">>],<br> <<>>,undefined,[],<br> [{<<"host">>,<<"localhost:8080">>},<br> {<<"connection">>,<<"Upgrade">>},<br> {<<"pragma">>,<<"no-cache">>},<br> {<<"cache-control">>,<<"no-cache">>},<br> {<<"upgrade">>,<<"websocket">>},<br> {<<"origin">>,<<"<a href="http://localhost:8080">http://localhost:8080</a>">>},<br> {<<"sec-websocket-version">>,<<"13">>},<br> {<<"user-agent">>,<br> <<"Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36">>},<br> {<<"accept-encoding">>,<<"gzip, deflate, sdch">>},<br> {<<"accept-language">>,<<"en-US,en;q=0.8">>},<br> {<<"sec-websocket-key">>,<<"by/gwaQvb/51W7Wa9zrGQg==">>},<br> {<<"sec-websocket-extensions">>,<br> <<"permessage-deflate; client_max_window_bits">>}],<br> [{<<"connection">>,[<<"upgrade">>]}],<br> undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,undefined},{state,[{handler,cowboy_static},<br> {handler_opts,{priv_dir,websocket_2,[]}},<br> {listener,http},<br> {dispatch,[{'_',[],<br> [{[],[],cowboy_static,<br> {priv_file,websocket_2,"index.html"}},<br> {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}},<br> {[<<"websocket_2">>],[],ws_handler_2,[]},<br> {[<<"static">>,'...'],<br> [],cowboy_static,<br> {priv_dir,websocket_2,"static"}}]}]}],<br> <<"GET">>,cowboy_static,<br> {<<"/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2">>,<br> {error,enoent},<br> []},<br> undefined,[],undefined,[],undefined,[],undefined,false,undefined,<br> undefined,undefined},#Fun<cowboy_rest.2.41839999>) (Timestamp: {1435,<br> 46126,<br> 935663})<br><br>I guess, I did something very wrong, but I did not found what is that, thus I would like to get some help from you.<br><br>Please find my small project in github: <a href="https://github.com/ethrbh/websocket_2">https://github.com/ethrbh/websocket_2</a><br><br>thanks for your help,<br>/Robi<br><br></div>
<br> + +</tt> diff --git a/_build/static/archives/extend/attachments/20150623/69dfc8e4/attachment.html b/_build/static/archives/extend/attachments/20150623/69dfc8e4/attachment.html new file mode 100644 index 00000000..afae15ff --- /dev/null +++ b/_build/static/archives/extend/attachments/20150623/69dfc8e4/attachment.html @@ -0,0 +1,4 @@ +<tt> +<div dir="ltr">hello,<br><br>First of all I would say I am a beginner in Cowboy web server, so probably I made something wrong, that is why I got the "fault", what I got.<br><br>I would like to build up web page, where the client can communicate to server, and server can do the same to client, if client does not send anything to server too. The Cowboy has the websocket example, what does what I would like to do.<br><br>There is only one thing is missing what I would like to have. This is the "frameset". My idea is to build the index.html using framsets. I made this changes, and I build up the html files for the frames, and of course I set these in the index.html. <br><br>Here is how the index.html looks like<br> <html><br><br> <head><br> <title>Welcome to Websocket example 2</title><br> </head><br><br> <frameset rows="64,*"><br> <frame name="top_frame" noresize="noresize" scrolling="no" src="frame_top.html"><br> <frameset cols="450,*"><br> <frame name="left_frame" scrolling="auto" src="frame_left.html"><br> <frame name="right_frame" src="frame_right.html"><br> </frameset><br> <noframes><br> <body><br><br> </body><br> </noframes><br> </frameset><br><br> </html><br><br>This is how the priv folder looks like<br>-----------------------------------------------------------<br> ls priv/<br> frame_left.html frame_right.html frame_top.html index.html static<br><br>This is how I changed the websocket_2_app:start/2 function<br>-----------------------------------------------------------<br> Dispatch = cowboy_router:compile([<br> {'_', [<br> <br> {"/", cowboy_static, {priv_file, websocket_2, "index.html"}},<br> {"/[...]", cowboy_static, {priv_dir, websocket_2, ""}},<br> <br> {"/websocket_2", ws_handler_2, []},<br> {"/static/[...]", cowboy_static, {priv_dir, websocket_2, "static"}}<br> ]}<br> ]),<br><br>After compile and make release package of the app, I can reach the webserver on the port 8080, but some connection does not set up correctly. The following texts are present in the browser<br> DISCONNECTED<br><br> ERROR: undefined<br><br> Connecting to: ws://localhost:8080/websocket_2<br><br>I made a dbg trace on all cowboy modules, to start some kind of troubleshooting. In the "tons" of printout I can see this one. So in the bottom of this, there is an {error,enoent}. It comes when tries connect to the socket. But unfortunatelly I do not have idea what may cause this :-(<br><br>The part of trace<br>-----------------------------------------------------------<br> (<0.177.0>) call cowboy_rest:next({http_req,#Port<0.646>,ranch_tcp,keepalive,<0.177.0>,<<"GET">>,'HTTP/1.1',<br> {{127,0,0,1},33241},<br> <<"localhost">>,undefined,8080,<<"/websocket_2">>,<br> [<<"websocket_2">>],<br> <<>>,undefined,[],<br> [{<<"host">>,<<"localhost:8080">>},<br> {<<"connection">>,<<"Upgrade">>},<br> {<<"pragma">>,<<"no-cache">>},<br> {<<"cache-control">>,<<"no-cache">>},<br> {<<"upgrade">>,<<"websocket">>},<br> {<<"origin">>,<<"<a href="http://localhost:8080">http://localhost:8080</a>">>},<br> {<<"sec-websocket-version">>,<<"13">>},<br> {<<"user-agent">>,<br> <<"Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36">>},<br> {<<"accept-encoding">>,<<"gzip, deflate, sdch">>},<br> {<<"accept-language">>,<<"en-US,en;q=0.8">>},<br> {<<"sec-websocket-key">>,<<"by/gwaQvb/51W7Wa9zrGQg==">>},<br> {<<"sec-websocket-extensions">>,<br> <<"permessage-deflate; client_max_window_bits">>}],<br> [{<<"connection">>,[<<"upgrade">>]}],<br> undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,undefined},{state,[{handler,cowboy_static},<br> {handler_opts,{priv_dir,websocket_2,[]}},<br> {listener,http},<br> {dispatch,[{'_',[],<br> [{[],[],cowboy_static,<br> {priv_file,websocket_2,"index.html"}},<br> {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}},<br> {[<<"websocket_2">>],[],ws_handler_2,[]},<br> {[<<"static">>,'...'],<br> [],cowboy_static,<br> {priv_dir,websocket_2,"static"}}]}]}],<br> <<"GET">>,cowboy_static,<br> {<<"/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2">>,<br> {error,enoent},<br> []},<br> undefined,[],undefined,[],undefined,[],undefined,false,undefined,<br> undefined,undefined},#Fun<cowboy_rest.2.41839999>) (Timestamp: {1435,<br> 46126,<br> 935663})<br><br>I guess, I did something very wrong, but I did not found what is that, thus I would like to get some help from you.<br><br>Please find my small project in github: <a href="https://github.com/ethrbh/websocket_2">https://github.com/ethrbh/websocket_2</a><br><br>thanks for your help,<br>/Robi<br><br></div>
<br> + +</tt> diff --git a/_build/static/archives/extend/attachments/20150623/dd7366a3/attachment-0001.html b/_build/static/archives/extend/attachments/20150623/dd7366a3/attachment-0001.html new file mode 100644 index 00000000..26109560 --- /dev/null +++ b/_build/static/archives/extend/attachments/20150623/dd7366a3/attachment-0001.html @@ -0,0 +1,160 @@ +<tt> +<div dir="ltr">I think the order of your routes is the problem, try putting this <a href="https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17">line</a> last.</div><div class="gmail_extra"><br><div class="gmail_quote">On 23 June 2015 at 09:56, Loïc Hoguin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The {error, enoent}, especially there, is probably just because the browser is trying to fetch the favicon.<br><br> +<br><br> +Your issue is that Websocket won't connect, so it has nothing to do with cowboy_rest. Try tracing cowboy_websocket or enable SASL to have more info.<div><div class="h5"><br><br> +<br><br> +On 06/23/2015 10:28 AM, Robert Balogh wrote:<br><br> +</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><br> +hello,<br><br> +<br><br> +First of all I would say I am a beginner in Cowboy web server, so<br><br> +probably I made something wrong, that is why I got the "fault", what I got.<br><br> +<br><br> +I would like to build up web page, where the client can communicate to<br><br> +server, and server can do the same to client, if client does not send<br><br> +anything to server too. The Cowboy has the websocket example, what does<br><br> +what I would like to do.<br><br> +<br><br> +There is only one thing is missing what I would like to have. This is<br><br> +the "frameset". My idea is to build the index.html using framsets. I<br><br> +made this changes, and I build up the html files for the frames, and of<br><br> +course I set these in the index.html.<br><br> +<br><br> +Here is how the index.html looks like<br><br> + <html><br><br> +<br><br> + <head><br><br> + <title>Welcome to Websocket example 2</title><br><br> + </head><br><br> +<br><br> + <frameset rows="64,*"><br><br> + <frame name="top_frame" noresize="noresize" scrolling="no"<br><br> +src="frame_top.html"><br><br> + <frameset cols="450,*"><br><br> + <frame name="left_frame" scrolling="auto"<br><br> +src="frame_left.html"><br><br> + <frame name="right_frame" src="frame_right.html"><br><br> + </frameset><br><br> + <noframes><br><br> + <body><br><br> +<br><br> + </body><br><br> + </noframes><br><br> + </frameset><br><br> +<br><br> + </html><br><br> +<br><br> +This is how the priv folder looks like<br><br> +-----------------------------------------------------------<br><br> + ls priv/<br><br> + frame_left.html frame_right.html frame_top.html index.html static<br><br> +<br><br> +This is how I changed the websocket_2_app:start/2 function<br><br> +-----------------------------------------------------------<br><br> + Dispatch = cowboy_router:compile([<br><br> + {'_', [<br><br> +<br><br> + {"/", cowboy_static, {priv_file, websocket_2, "index.html"}},<br><br> + {"/[...]", cowboy_static, {priv_dir, websocket_2, ""}},<br><br> +<br><br> + {"/websocket_2", ws_handler_2, []},<br><br> + {"/static/[...]", cowboy_static, {priv_dir, websocket_2,<br><br> +"static"}}<br><br> + ]}<br><br> + ]),<br><br> +<br><br> +After compile and make release package of the app, I can reach the<br><br> +webserver on the port 8080, but some connection does not set up<br><br> +correctly. The following texts are present in the browser<br><br> + DISCONNECTED<br><br> +<br><br> + ERROR: undefined<br><br> +<br><br> + Connecting to: ws://localhost:8080/websocket_2<br><br> +<br><br> +I made a dbg trace on all cowboy modules, to start some kind of<br><br> +troubleshooting. In the "tons" of printout I can see this one. So in the<br><br> +bottom of this, there is an {error,enoent}. It comes when tries connect<br><br> +to the socket. But unfortunatelly I do not have idea what may cause this :-(<br><br> +<br><br> +The part of trace<br><br> +-----------------------------------------------------------<br><br> + (<0.177.0>) call<br><br> +cowboy_rest:next({http_req,#Port<0.646>,ranch_tcp,keepalive,<0.177.0>,<<"GET">>,'HTTP/1.1',<br><br> + {{127,0,0,1},33241},<br><br> + <<"localhost">>,undefined,8080,<<"/websocket_2">>,<br><br> + [<<"websocket_2">>],<br><br> + <<>>,undefined,[],<br><br> + [{<<"host">>,<<"localhost:8080">>},<br><br> + {<<"connection">>,<<"Upgrade">>},<br><br> + {<<"pragma">>,<<"no-cache">>},<br><br> + {<<"cache-control">>,<<"no-cache">>},<br><br> + {<<"upgrade">>,<<"websocket">>},<br><br> + {<<"origin">>,<<"<a href="http://localhost:8080" rel="noreferrer" target="_blank">http://localhost:8080</a>">>},<br><br> + {<<"sec-websocket-version">>,<<"13">>},<br><br> + {<<"user-agent">>,<br><br> + <<"Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36<br><br> +(KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36">>},<br><br> + {<<"accept-encoding">>,<<"gzip, deflate, sdch">>},<br><br> + {<<"accept-language">>,<<"en-US,en;q=0.8">>},<br><br> + {<<"sec-websocket-key">>,<<"by/gwaQvb/51W7Wa9zrGQg==">>},<br><br> + {<<"sec-websocket-extensions">>,<br><br> + <<"permessage-deflate; client_max_window_bits">>}],<br><br> + [{<<"connection">>,[<<"upgrade">>]}],<br><br> +<br><br> +undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,undefined},{state,[{handler,cowboy_static},<br><br> + {handler_opts,{priv_dir,websocket_2,[]}},<br><br> + {listener,http},<br><br> + {dispatch,[{'_',[],<br><br> + [{[],[],cowboy_static,<br><br> + {priv_file,websocket_2,"index.html"}},<br><br> +<br><br> + {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}},<br><br> + {[<<"websocket_2">>],[],ws_handler_2,[]},<br><br> + {[<<"static">>,'...'],<br><br> + [],cowboy_static,<br><br> + {priv_dir,websocket_2,"static"}}]}]}],<br><br> + <<"GET">>,cowboy_static,<br><br> +<br><br> +{<<"/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2">>,<br><br> + {error,enoent},<br><br> + []},<br><br> +<br><br> +undefined,[],undefined,[],undefined,[],undefined,false,undefined,<br><br> + undefined,undefined},#Fun<cowboy_rest.2.41839999>)<br><br> +(Timestamp: {1435,<br><br> +<br><br> + 46126,<br><br> +<br><br> + 935663})<br><br> +<br><br> +I guess, I did something very wrong, but I did not found what is that,<br><br> +thus I would like to get some help from you.<br><br> +<br><br> +Please find my small project in github:<br><br> +<a href="https://github.com/ethrbh/websocket_2" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2</a><br><br> +<br><br> +thanks for your help,<br><br> +/Robi<br><br> +<br><br> +<br><br> +<br></div></div><br> +_______________________________________________<br><br> +Extend mailing list<br><br> +<a href="mailto:[email protected]" target="_blank">[email protected]</a><br><br> +<a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br><br> +<br><span class="HOEnZb"><font color="#888888"><br> +</font></span></blockquote><span class="HOEnZb"><font color="#888888"><br> +<br><br> +-- <br><br> +Loïc Hoguin<br><br> +<a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br><br> +Author of The Erlanger Playbook,<br><br> +A book about software development using Erlang<br><br> +_______________________________________________<br><br> +Extend mailing list<br><br> +<a href="mailto:[email protected]" target="_blank">[email protected]</a><br><br> +<a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br><br> +</font></span></blockquote></div><br></div><br> + +</tt> diff --git a/_build/static/archives/extend/attachments/20150623/dd7366a3/attachment.html b/_build/static/archives/extend/attachments/20150623/dd7366a3/attachment.html new file mode 100644 index 00000000..26109560 --- /dev/null +++ b/_build/static/archives/extend/attachments/20150623/dd7366a3/attachment.html @@ -0,0 +1,160 @@ +<tt> +<div dir="ltr">I think the order of your routes is the problem, try putting this <a href="https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17">line</a> last.</div><div class="gmail_extra"><br><div class="gmail_quote">On 23 June 2015 at 09:56, Loïc Hoguin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The {error, enoent}, especially there, is probably just because the browser is trying to fetch the favicon.<br><br> +<br><br> +Your issue is that Websocket won't connect, so it has nothing to do with cowboy_rest. Try tracing cowboy_websocket or enable SASL to have more info.<div><div class="h5"><br><br> +<br><br> +On 06/23/2015 10:28 AM, Robert Balogh wrote:<br><br> +</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><br> +hello,<br><br> +<br><br> +First of all I would say I am a beginner in Cowboy web server, so<br><br> +probably I made something wrong, that is why I got the "fault", what I got.<br><br> +<br><br> +I would like to build up web page, where the client can communicate to<br><br> +server, and server can do the same to client, if client does not send<br><br> +anything to server too. The Cowboy has the websocket example, what does<br><br> +what I would like to do.<br><br> +<br><br> +There is only one thing is missing what I would like to have. This is<br><br> +the "frameset". My idea is to build the index.html using framsets. I<br><br> +made this changes, and I build up the html files for the frames, and of<br><br> +course I set these in the index.html.<br><br> +<br><br> +Here is how the index.html looks like<br><br> + <html><br><br> +<br><br> + <head><br><br> + <title>Welcome to Websocket example 2</title><br><br> + </head><br><br> +<br><br> + <frameset rows="64,*"><br><br> + <frame name="top_frame" noresize="noresize" scrolling="no"<br><br> +src="frame_top.html"><br><br> + <frameset cols="450,*"><br><br> + <frame name="left_frame" scrolling="auto"<br><br> +src="frame_left.html"><br><br> + <frame name="right_frame" src="frame_right.html"><br><br> + </frameset><br><br> + <noframes><br><br> + <body><br><br> +<br><br> + </body><br><br> + </noframes><br><br> + </frameset><br><br> +<br><br> + </html><br><br> +<br><br> +This is how the priv folder looks like<br><br> +-----------------------------------------------------------<br><br> + ls priv/<br><br> + frame_left.html frame_right.html frame_top.html index.html static<br><br> +<br><br> +This is how I changed the websocket_2_app:start/2 function<br><br> +-----------------------------------------------------------<br><br> + Dispatch = cowboy_router:compile([<br><br> + {'_', [<br><br> +<br><br> + {"/", cowboy_static, {priv_file, websocket_2, "index.html"}},<br><br> + {"/[...]", cowboy_static, {priv_dir, websocket_2, ""}},<br><br> +<br><br> + {"/websocket_2", ws_handler_2, []},<br><br> + {"/static/[...]", cowboy_static, {priv_dir, websocket_2,<br><br> +"static"}}<br><br> + ]}<br><br> + ]),<br><br> +<br><br> +After compile and make release package of the app, I can reach the<br><br> +webserver on the port 8080, but some connection does not set up<br><br> +correctly. The following texts are present in the browser<br><br> + DISCONNECTED<br><br> +<br><br> + ERROR: undefined<br><br> +<br><br> + Connecting to: ws://localhost:8080/websocket_2<br><br> +<br><br> +I made a dbg trace on all cowboy modules, to start some kind of<br><br> +troubleshooting. In the "tons" of printout I can see this one. So in the<br><br> +bottom of this, there is an {error,enoent}. It comes when tries connect<br><br> +to the socket. But unfortunatelly I do not have idea what may cause this :-(<br><br> +<br><br> +The part of trace<br><br> +-----------------------------------------------------------<br><br> + (<0.177.0>) call<br><br> +cowboy_rest:next({http_req,#Port<0.646>,ranch_tcp,keepalive,<0.177.0>,<<"GET">>,'HTTP/1.1',<br><br> + {{127,0,0,1},33241},<br><br> + <<"localhost">>,undefined,8080,<<"/websocket_2">>,<br><br> + [<<"websocket_2">>],<br><br> + <<>>,undefined,[],<br><br> + [{<<"host">>,<<"localhost:8080">>},<br><br> + {<<"connection">>,<<"Upgrade">>},<br><br> + {<<"pragma">>,<<"no-cache">>},<br><br> + {<<"cache-control">>,<<"no-cache">>},<br><br> + {<<"upgrade">>,<<"websocket">>},<br><br> + {<<"origin">>,<<"<a href="http://localhost:8080" rel="noreferrer" target="_blank">http://localhost:8080</a>">>},<br><br> + {<<"sec-websocket-version">>,<<"13">>},<br><br> + {<<"user-agent">>,<br><br> + <<"Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36<br><br> +(KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36">>},<br><br> + {<<"accept-encoding">>,<<"gzip, deflate, sdch">>},<br><br> + {<<"accept-language">>,<<"en-US,en;q=0.8">>},<br><br> + {<<"sec-websocket-key">>,<<"by/gwaQvb/51W7Wa9zrGQg==">>},<br><br> + {<<"sec-websocket-extensions">>,<br><br> + <<"permessage-deflate; client_max_window_bits">>}],<br><br> + [{<<"connection">>,[<<"upgrade">>]}],<br><br> +<br><br> +undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,undefined},{state,[{handler,cowboy_static},<br><br> + {handler_opts,{priv_dir,websocket_2,[]}},<br><br> + {listener,http},<br><br> + {dispatch,[{'_',[],<br><br> + [{[],[],cowboy_static,<br><br> + {priv_file,websocket_2,"index.html"}},<br><br> +<br><br> + {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}},<br><br> + {[<<"websocket_2">>],[],ws_handler_2,[]},<br><br> + {[<<"static">>,'...'],<br><br> + [],cowboy_static,<br><br> + {priv_dir,websocket_2,"static"}}]}]}],<br><br> + <<"GET">>,cowboy_static,<br><br> +<br><br> +{<<"/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2">>,<br><br> + {error,enoent},<br><br> + []},<br><br> +<br><br> +undefined,[],undefined,[],undefined,[],undefined,false,undefined,<br><br> + undefined,undefined},#Fun<cowboy_rest.2.41839999>)<br><br> +(Timestamp: {1435,<br><br> +<br><br> + 46126,<br><br> +<br><br> + 935663})<br><br> +<br><br> +I guess, I did something very wrong, but I did not found what is that,<br><br> +thus I would like to get some help from you.<br><br> +<br><br> +Please find my small project in github:<br><br> +<a href="https://github.com/ethrbh/websocket_2" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2</a><br><br> +<br><br> +thanks for your help,<br><br> +/Robi<br><br> +<br><br> +<br><br> +<br></div></div><br> +_______________________________________________<br><br> +Extend mailing list<br><br> +<a href="mailto:[email protected]" target="_blank">[email protected]</a><br><br> +<a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br><br> +<br><span class="HOEnZb"><font color="#888888"><br> +</font></span></blockquote><span class="HOEnZb"><font color="#888888"><br> +<br><br> +-- <br><br> +Loïc Hoguin<br><br> +<a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br><br> +Author of The Erlanger Playbook,<br><br> +A book about software development using Erlang<br><br> +_______________________________________________<br><br> +Extend mailing list<br><br> +<a href="mailto:[email protected]" target="_blank">[email protected]</a><br><br> +<a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br><br> +</font></span></blockquote></div><br></div><br> + +</tt> diff --git a/_build/static/archives/extend/attachments/20150623/f7c19f68/attachment-0001.html b/_build/static/archives/extend/attachments/20150623/f7c19f68/attachment-0001.html new file mode 100644 index 00000000..d9145fe0 --- /dev/null +++ b/_build/static/archives/extend/attachments/20150623/f7c19f68/attachment-0001.html @@ -0,0 +1,256 @@ +<tt> +<div dir="ltr"><div><div><div>hello,<br><br></div>I would like to thanks for both of you the grate support.<br><br></div>thanks again,<br></div>/Robi<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-23 11:12 GMT+02:00 Loïc Hoguin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've opened a ticket to remember so something will be done eventually. Thanks for helping!<span class=""><br>
<br> +<br>
<br> +On 06/23/2015 11:11 AM, Graham Hay wrote:<br>
<br> +</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br> +It's bitten me a few times :(<br>
<br> +<br>
<br> +On 23 June 2015 at 10:09, Loïc Hoguin <<a href="mailto:[email protected]" target="_blank">[email protected]</a><br></span><span class="">
<br> +<mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>>> wrote:<br>
<br> +<br>
<br> + Oh nice catch ahah. We should probably warn when something like this<br>
<br> + happens.<br>
<br> +<br>
<br> + On 06/23/2015 11:06 AM, Graham Hay wrote:<br>
<br> +<br>
<br> + I think the order of your routes is the problem, try putting<br>
<br> + this line<br>
<br> + <<a href="https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17</a>><br>
<br> + last.<br>
<br> +<br>
<br> + On 23 June 2015 at 09:56, Loïc Hoguin <<a href="mailto:[email protected]" target="_blank">[email protected]</a><br>
<br> + <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><br></span><div><div class="h5">
<br> + <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>>>> wrote:<br>
<br> +<br>
<br> + The {error, enoent}, especially there, is probably just<br>
<br> + because the<br>
<br> + browser is trying to fetch the favicon.<br>
<br> +<br>
<br> + Your issue is that Websocket won't connect, so it has<br>
<br> + nothing to do<br>
<br> + with cowboy_rest. Try tracing cowboy_websocket or enable<br>
<br> + SASL to<br>
<br> + have more info.<br>
<br> +<br>
<br> +<br>
<br> + On 06/23/2015 10:28 AM, Robert Balogh wrote:<br>
<br> +<br>
<br> + hello,<br>
<br> +<br>
<br> + First of all I would say I am a beginner in Cowboy web<br>
<br> + server, so<br>
<br> + probably I made something wrong, that is why I got the<br>
<br> + "fault",<br>
<br> + what I got.<br>
<br> +<br>
<br> + I would like to build up web page, where the client can<br>
<br> + communicate to<br>
<br> + server, and server can do the same to client, if client<br>
<br> + does not<br>
<br> + send<br>
<br> + anything to server too. The Cowboy has the websocket<br>
<br> + example,<br>
<br> + what does<br>
<br> + what I would like to do.<br>
<br> +<br>
<br> + There is only one thing is missing what I would like to<br>
<br> + have.<br>
<br> + This is<br>
<br> + the "frameset". My idea is to build the index.html<br>
<br> + using framsets. I<br>
<br> + made this changes, and I build up the html files for<br>
<br> + the frames,<br>
<br> + and of<br>
<br> + course I set these in the index.html.<br>
<br> +<br>
<br> + Here is how the index.html looks like<br>
<br> + <html><br>
<br> +<br>
<br> + <head><br>
<br> + <title>Welcome to Websocket example 2</title><br>
<br> + </head><br>
<br> +<br>
<br> + <frameset rows="64,*"><br>
<br> + <frame name="top_frame" noresize="noresize"<br>
<br> + scrolling="no"<br>
<br> + src="frame_top.html"><br>
<br> + <frameset cols="450,*"><br>
<br> + <frame name="left_frame" scrolling="auto"<br>
<br> + src="frame_left.html"><br>
<br> + <frame name="right_frame"<br>
<br> + src="frame_right.html"><br>
<br> + </frameset><br>
<br> + <noframes><br>
<br> + <body><br>
<br> +<br>
<br> + </body><br>
<br> + </noframes><br>
<br> + </frameset><br>
<br> +<br>
<br> + </html><br>
<br> +<br>
<br> + This is how the priv folder looks like<br>
<br> + -----------------------------------------------------------<br>
<br> + ls priv/<br>
<br> + frame_left.html frame_right.html frame_top.html<br>
<br> + index.html static<br>
<br> +<br>
<br> + This is how I changed the websocket_2_app:start/2 function<br>
<br> + -----------------------------------------------------------<br>
<br> + Dispatch = cowboy_router:compile([<br>
<br> + {'_', [<br>
<br> +<br>
<br> + {"/", cowboy_static, {priv_file, websocket_2,<br>
<br> + "index.html"}},<br>
<br> + {"/[...]", cowboy_static, {priv_dir,<br>
<br> + websocket_2,<br>
<br> + ""}},<br>
<br> +<br>
<br> + {"/websocket_2", ws_handler_2, []},<br>
<br> + {"/static/[...]", cowboy_static, {priv_dir,<br>
<br> + websocket_2,<br>
<br> + "static"}}<br>
<br> + ]}<br>
<br> + ]),<br>
<br> +<br>
<br> + After compile and make release package of the app, I<br>
<br> + can reach the<br>
<br> + webserver on the port 8080, but some connection does<br>
<br> + not set up<br>
<br> + correctly. The following texts are present in the browser<br>
<br> + DISCONNECTED<br>
<br> +<br>
<br> + ERROR: undefined<br>
<br> +<br>
<br> + Connecting to: ws://localhost:8080/websocket_2<br>
<br> +<br>
<br> + I made a dbg trace on all cowboy modules, to start some<br>
<br> + kind of<br>
<br> + troubleshooting. In the "tons" of printout I can see<br>
<br> + this one.<br>
<br> + So in the<br>
<br> + bottom of this, there is an {error,enoent}. It comes<br>
<br> + when tries<br>
<br> + connect<br>
<br> + to the socket. But unfortunatelly I do not have idea<br>
<br> + what may<br>
<br> + cause this :-(<br>
<br> +<br>
<br> + The part of trace<br>
<br> + -----------------------------------------------------------<br>
<br> + (<0.177.0>) call<br>
<br> +<br>
<br> + cowboy_rest:next({http_req,#Port<0.646>,ranch_tcp,keepalive,<0.177.0>,<<"GET">>,'HTTP/1.1',<br>
<br> + {{127,0,0,1},33241},<br>
<br> +<br>
<br> + <<"localhost">>,undefined,8080,<<"/websocket_2">>,<br>
<br> + [<<"websocket_2">>],<br>
<br> + <<>>,undefined,[],<br>
<br> + [{<<"host">>,<<"localhost:8080">>},<br>
<br> + {<<"connection">>,<<"Upgrade">>},<br>
<br> + {<<"pragma">>,<<"no-cache">>},<br>
<br> + {<<"cache-control">>,<<"no-cache">>},<br>
<br> + {<<"upgrade">>,<<"websocket">>},<br>
<br> +<br>
<br> + {<<"origin">>,<<"<a href="http://localhost:8080" rel="noreferrer" target="_blank">http://localhost:8080</a>">>},<br>
<br> + {<<"sec-websocket-version">>,<<"13">>},<br>
<br> + {<<"user-agent">>,<br>
<br> + <<"Mozilla/5.0 (X11; Linux i686)<br>
<br> + AppleWebKit/537.36<br>
<br> + (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36">>},<br>
<br> + {<<"accept-encoding">>,<<"gzip,<br>
<br> + deflate, sdch">>},<br>
<br> +<br>
<br> + {<<"accept-language">>,<<"en-US,en;q=0.8">>},<br>
<br> +<br>
<br> + {<<"sec-websocket-key">>,<<"by/gwaQvb/51W7Wa9zrGQg==">>},<br>
<br> + {<<"sec-websocket-extensions">>,<br>
<br> + <<"permessage-deflate;<br>
<br> + client_max_window_bits">>}],<br>
<br> + [{<<"connection">>,[<<"upgrade">>]}],<br>
<br> +<br>
<br> +<br>
<br> + undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,undefined},{state,[{handler,cowboy_static},<br>
<br> + {handler_opts,{priv_dir,websocket_2,[]}},<br>
<br> + {listener,http},<br>
<br> + {dispatch,[{'_',[],<br>
<br> + [{[],[],cowboy_static,<br>
<br> +<br>
<br> + {priv_file,websocket_2,"index.html"}},<br>
<br> +<br>
<br> + {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}},<br>
<br> +<br>
<br> + {[<<"websocket_2">>],[],ws_handler_2,[]},<br>
<br> + {[<<"static">>,'...'],<br>
<br> + [],cowboy_static,<br>
<br> +<br>
<br> + {priv_dir,websocket_2,"static"}}]}]}],<br>
<br> + <<"GET">>,cowboy_static,<br>
<br> +<br>
<br> +<br>
<br> + {<<"/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2">>,<br>
<br> + {error,enoent},<br>
<br> + []},<br>
<br> +<br>
<br> +<br>
<br> + undefined,[],undefined,[],undefined,[],undefined,false,undefined,<br>
<br> +<br>
<br> + undefined,undefined},#Fun<cowboy_rest.2.41839999>)<br>
<br> + (Timestamp: {1435,<br>
<br> +<br>
<br> + 46126,<br>
<br> +<br>
<br> + 935663})<br>
<br> +<br>
<br> + I guess, I did something very wrong, but I did not<br>
<br> + found what is<br>
<br> + that,<br>
<br> + thus I would like to get some help from you.<br>
<br> +<br>
<br> + Please find my small project in github:<br>
<br> + <a href="https://github.com/ethrbh/websocket_2" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2</a><br>
<br> +<br>
<br> + thanks for your help,<br>
<br> + /Robi<br>
<br> +<br>
<br> +<br>
<br> +<br>
<br> + _______________________________________________<br>
<br> + Extend mailing list<br>
<br> + <a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><br></div></div>
<br> + <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a><span class=""><br>
<br> + <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>>><br>
<br> + <a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br>
<br> +<br>
<br> +<br>
<br> + --<br>
<br> + Loïc Hoguin<br>
<br> + <a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br>
<br> + Author of The Erlanger Playbook,<br>
<br> + A book about software development using Erlang<br>
<br> + _______________________________________________<br>
<br> + Extend mailing list<br>
<br> + <a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><br></span>
<br> + <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a><span class=""><br>
<br> + <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>>><br>
<br> + <a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br>
<br> +<br>
<br> +<br>
<br> +<br>
<br> + --<br>
<br> + Loïc Hoguin<br>
<br> + <a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br>
<br> + Author of The Erlanger Playbook,<br>
<br> + A book about software development using Erlang<br>
<br> +<br>
<br> +<br>
<br> +</span></blockquote><div class="HOEnZb"><div class="h5">
<br> +<br>
<br> +-- <br>
<br> +Loïc Hoguin<br>
<br> +<a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br>
<br> +Author of The Erlanger Playbook,<br>
<br> +A book about software development using Erlang<br>
<br> +</div></div></blockquote></div><br></div>
<br> + +</tt> diff --git a/_build/static/archives/extend/attachments/20150623/f7c19f68/attachment.html b/_build/static/archives/extend/attachments/20150623/f7c19f68/attachment.html new file mode 100644 index 00000000..d9145fe0 --- /dev/null +++ b/_build/static/archives/extend/attachments/20150623/f7c19f68/attachment.html @@ -0,0 +1,256 @@ +<tt> +<div dir="ltr"><div><div><div>hello,<br><br></div>I would like to thanks for both of you the grate support.<br><br></div>thanks again,<br></div>/Robi<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-23 11:12 GMT+02:00 Loïc Hoguin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've opened a ticket to remember so something will be done eventually. Thanks for helping!<span class=""><br>
<br> +<br>
<br> +On 06/23/2015 11:11 AM, Graham Hay wrote:<br>
<br> +</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br> +It's bitten me a few times :(<br>
<br> +<br>
<br> +On 23 June 2015 at 10:09, Loïc Hoguin <<a href="mailto:[email protected]" target="_blank">[email protected]</a><br></span><span class="">
<br> +<mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>>> wrote:<br>
<br> +<br>
<br> + Oh nice catch ahah. We should probably warn when something like this<br>
<br> + happens.<br>
<br> +<br>
<br> + On 06/23/2015 11:06 AM, Graham Hay wrote:<br>
<br> +<br>
<br> + I think the order of your routes is the problem, try putting<br>
<br> + this line<br>
<br> + <<a href="https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17</a>><br>
<br> + last.<br>
<br> +<br>
<br> + On 23 June 2015 at 09:56, Loïc Hoguin <<a href="mailto:[email protected]" target="_blank">[email protected]</a><br>
<br> + <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><br></span><div><div class="h5">
<br> + <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>>>> wrote:<br>
<br> +<br>
<br> + The {error, enoent}, especially there, is probably just<br>
<br> + because the<br>
<br> + browser is trying to fetch the favicon.<br>
<br> +<br>
<br> + Your issue is that Websocket won't connect, so it has<br>
<br> + nothing to do<br>
<br> + with cowboy_rest. Try tracing cowboy_websocket or enable<br>
<br> + SASL to<br>
<br> + have more info.<br>
<br> +<br>
<br> +<br>
<br> + On 06/23/2015 10:28 AM, Robert Balogh wrote:<br>
<br> +<br>
<br> + hello,<br>
<br> +<br>
<br> + First of all I would say I am a beginner in Cowboy web<br>
<br> + server, so<br>
<br> + probably I made something wrong, that is why I got the<br>
<br> + "fault",<br>
<br> + what I got.<br>
<br> +<br>
<br> + I would like to build up web page, where the client can<br>
<br> + communicate to<br>
<br> + server, and server can do the same to client, if client<br>
<br> + does not<br>
<br> + send<br>
<br> + anything to server too. The Cowboy has the websocket<br>
<br> + example,<br>
<br> + what does<br>
<br> + what I would like to do.<br>
<br> +<br>
<br> + There is only one thing is missing what I would like to<br>
<br> + have.<br>
<br> + This is<br>
<br> + the "frameset". My idea is to build the index.html<br>
<br> + using framsets. I<br>
<br> + made this changes, and I build up the html files for<br>
<br> + the frames,<br>
<br> + and of<br>
<br> + course I set these in the index.html.<br>
<br> +<br>
<br> + Here is how the index.html looks like<br>
<br> + <html><br>
<br> +<br>
<br> + <head><br>
<br> + <title>Welcome to Websocket example 2</title><br>
<br> + </head><br>
<br> +<br>
<br> + <frameset rows="64,*"><br>
<br> + <frame name="top_frame" noresize="noresize"<br>
<br> + scrolling="no"<br>
<br> + src="frame_top.html"><br>
<br> + <frameset cols="450,*"><br>
<br> + <frame name="left_frame" scrolling="auto"<br>
<br> + src="frame_left.html"><br>
<br> + <frame name="right_frame"<br>
<br> + src="frame_right.html"><br>
<br> + </frameset><br>
<br> + <noframes><br>
<br> + <body><br>
<br> +<br>
<br> + </body><br>
<br> + </noframes><br>
<br> + </frameset><br>
<br> +<br>
<br> + </html><br>
<br> +<br>
<br> + This is how the priv folder looks like<br>
<br> + -----------------------------------------------------------<br>
<br> + ls priv/<br>
<br> + frame_left.html frame_right.html frame_top.html<br>
<br> + index.html static<br>
<br> +<br>
<br> + This is how I changed the websocket_2_app:start/2 function<br>
<br> + -----------------------------------------------------------<br>
<br> + Dispatch = cowboy_router:compile([<br>
<br> + {'_', [<br>
<br> +<br>
<br> + {"/", cowboy_static, {priv_file, websocket_2,<br>
<br> + "index.html"}},<br>
<br> + {"/[...]", cowboy_static, {priv_dir,<br>
<br> + websocket_2,<br>
<br> + ""}},<br>
<br> +<br>
<br> + {"/websocket_2", ws_handler_2, []},<br>
<br> + {"/static/[...]", cowboy_static, {priv_dir,<br>
<br> + websocket_2,<br>
<br> + "static"}}<br>
<br> + ]}<br>
<br> + ]),<br>
<br> +<br>
<br> + After compile and make release package of the app, I<br>
<br> + can reach the<br>
<br> + webserver on the port 8080, but some connection does<br>
<br> + not set up<br>
<br> + correctly. The following texts are present in the browser<br>
<br> + DISCONNECTED<br>
<br> +<br>
<br> + ERROR: undefined<br>
<br> +<br>
<br> + Connecting to: ws://localhost:8080/websocket_2<br>
<br> +<br>
<br> + I made a dbg trace on all cowboy modules, to start some<br>
<br> + kind of<br>
<br> + troubleshooting. In the "tons" of printout I can see<br>
<br> + this one.<br>
<br> + So in the<br>
<br> + bottom of this, there is an {error,enoent}. It comes<br>
<br> + when tries<br>
<br> + connect<br>
<br> + to the socket. But unfortunatelly I do not have idea<br>
<br> + what may<br>
<br> + cause this :-(<br>
<br> +<br>
<br> + The part of trace<br>
<br> + -----------------------------------------------------------<br>
<br> + (<0.177.0>) call<br>
<br> +<br>
<br> + cowboy_rest:next({http_req,#Port<0.646>,ranch_tcp,keepalive,<0.177.0>,<<"GET">>,'HTTP/1.1',<br>
<br> + {{127,0,0,1},33241},<br>
<br> +<br>
<br> + <<"localhost">>,undefined,8080,<<"/websocket_2">>,<br>
<br> + [<<"websocket_2">>],<br>
<br> + <<>>,undefined,[],<br>
<br> + [{<<"host">>,<<"localhost:8080">>},<br>
<br> + {<<"connection">>,<<"Upgrade">>},<br>
<br> + {<<"pragma">>,<<"no-cache">>},<br>
<br> + {<<"cache-control">>,<<"no-cache">>},<br>
<br> + {<<"upgrade">>,<<"websocket">>},<br>
<br> +<br>
<br> + {<<"origin">>,<<"<a href="http://localhost:8080" rel="noreferrer" target="_blank">http://localhost:8080</a>">>},<br>
<br> + {<<"sec-websocket-version">>,<<"13">>},<br>
<br> + {<<"user-agent">>,<br>
<br> + <<"Mozilla/5.0 (X11; Linux i686)<br>
<br> + AppleWebKit/537.36<br>
<br> + (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36">>},<br>
<br> + {<<"accept-encoding">>,<<"gzip,<br>
<br> + deflate, sdch">>},<br>
<br> +<br>
<br> + {<<"accept-language">>,<<"en-US,en;q=0.8">>},<br>
<br> +<br>
<br> + {<<"sec-websocket-key">>,<<"by/gwaQvb/51W7Wa9zrGQg==">>},<br>
<br> + {<<"sec-websocket-extensions">>,<br>
<br> + <<"permessage-deflate;<br>
<br> + client_max_window_bits">>}],<br>
<br> + [{<<"connection">>,[<<"upgrade">>]}],<br>
<br> +<br>
<br> +<br>
<br> + undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,undefined},{state,[{handler,cowboy_static},<br>
<br> + {handler_opts,{priv_dir,websocket_2,[]}},<br>
<br> + {listener,http},<br>
<br> + {dispatch,[{'_',[],<br>
<br> + [{[],[],cowboy_static,<br>
<br> +<br>
<br> + {priv_file,websocket_2,"index.html"}},<br>
<br> +<br>
<br> + {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}},<br>
<br> +<br>
<br> + {[<<"websocket_2">>],[],ws_handler_2,[]},<br>
<br> + {[<<"static">>,'...'],<br>
<br> + [],cowboy_static,<br>
<br> +<br>
<br> + {priv_dir,websocket_2,"static"}}]}]}],<br>
<br> + <<"GET">>,cowboy_static,<br>
<br> +<br>
<br> +<br>
<br> + {<<"/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2">>,<br>
<br> + {error,enoent},<br>
<br> + []},<br>
<br> +<br>
<br> +<br>
<br> + undefined,[],undefined,[],undefined,[],undefined,false,undefined,<br>
<br> +<br>
<br> + undefined,undefined},#Fun<cowboy_rest.2.41839999>)<br>
<br> + (Timestamp: {1435,<br>
<br> +<br>
<br> + 46126,<br>
<br> +<br>
<br> + 935663})<br>
<br> +<br>
<br> + I guess, I did something very wrong, but I did not<br>
<br> + found what is<br>
<br> + that,<br>
<br> + thus I would like to get some help from you.<br>
<br> +<br>
<br> + Please find my small project in github:<br>
<br> + <a href="https://github.com/ethrbh/websocket_2" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2</a><br>
<br> +<br>
<br> + thanks for your help,<br>
<br> + /Robi<br>
<br> +<br>
<br> +<br>
<br> +<br>
<br> + _______________________________________________<br>
<br> + Extend mailing list<br>
<br> + <a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><br></div></div>
<br> + <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a><span class=""><br>
<br> + <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>>><br>
<br> + <a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br>
<br> +<br>
<br> +<br>
<br> + --<br>
<br> + Loïc Hoguin<br>
<br> + <a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br>
<br> + Author of The Erlanger Playbook,<br>
<br> + A book about software development using Erlang<br>
<br> + _______________________________________________<br>
<br> + Extend mailing list<br>
<br> + <a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><br></span>
<br> + <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a><span class=""><br>
<br> + <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>>><br>
<br> + <a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br>
<br> +<br>
<br> +<br>
<br> +<br>
<br> + --<br>
<br> + Loïc Hoguin<br>
<br> + <a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br>
<br> + Author of The Erlanger Playbook,<br>
<br> + A book about software development using Erlang<br>
<br> +<br>
<br> +<br>
<br> +</span></blockquote><div class="HOEnZb"><div class="h5">
<br> +<br>
<br> +-- <br>
<br> +Loïc Hoguin<br>
<br> +<a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br>
<br> +Author of The Erlanger Playbook,<br>
<br> +A book about software development using Erlang<br>
<br> +</div></div></blockquote></div><br></div>
<br> + +</tt> diff --git a/_build/static/archives/extend/attachments/20150623/fcdb2d7b/attachment-0001.html b/_build/static/archives/extend/attachments/20150623/fcdb2d7b/attachment-0001.html new file mode 100644 index 00000000..70f7ec08 --- /dev/null +++ b/_build/static/archives/extend/attachments/20150623/fcdb2d7b/attachment-0001.html @@ -0,0 +1,203 @@ +<tt> +<div dir="ltr"><div><div><div><div><div>hello,<br><br></div>Thanks for all. The solution is to put the line at last<br> {<span class=""><span class="">"</span>/[...]<span class="">"</span></span>, <span class="">cowboy_static</span>, {<span class="">priv_dir</span>, <span class="">websocket_2</span>, <span class=""><span class="">"</span><span class="">"</span></span>}}<br><br></div>Now It works as I expect.<br><br></div>thanks for your help again.<br><br></div>br,<br></div>/Robi<br><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-23 11:09 GMT+02:00 Loïc Hoguin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Oh nice catch ahah. We should probably warn when something like this happens.<span class=""><br><br> +<br><br> +On 06/23/2015 11:06 AM, Graham Hay wrote:<br><br> +</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br> +I think the order of your routes is the problem, try putting this line<br></span><br> +<<a href="https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17</a>><span class=""><br><br> +last.<br><br> +<br><br> +On 23 June 2015 at 09:56, Loïc Hoguin <<a href="mailto:[email protected]" target="_blank">[email protected]</a><br></span><div><div class="h5"><br> +<mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>>> wrote:<br><br> +<br><br> + The {error, enoent}, especially there, is probably just because the<br><br> + browser is trying to fetch the favicon.<br><br> +<br><br> + Your issue is that Websocket won't connect, so it has nothing to do<br><br> + with cowboy_rest. Try tracing cowboy_websocket or enable SASL to<br><br> + have more info.<br><br> +<br><br> +<br><br> + On 06/23/2015 10:28 AM, Robert Balogh wrote:<br><br> +<br><br> + hello,<br><br> +<br><br> + First of all I would say I am a beginner in Cowboy web server, so<br><br> + probably I made something wrong, that is why I got the "fault",<br><br> + what I got.<br><br> +<br><br> + I would like to build up web page, where the client can<br><br> + communicate to<br><br> + server, and server can do the same to client, if client does not<br><br> + send<br><br> + anything to server too. The Cowboy has the websocket example,<br><br> + what does<br><br> + what I would like to do.<br><br> +<br><br> + There is only one thing is missing what I would like to have.<br><br> + This is<br><br> + the "frameset". My idea is to build the index.html using framsets. I<br><br> + made this changes, and I build up the html files for the frames,<br><br> + and of<br><br> + course I set these in the index.html.<br><br> +<br><br> + Here is how the index.html looks like<br><br> + <html><br><br> +<br><br> + <head><br><br> + <title>Welcome to Websocket example 2</title><br><br> + </head><br><br> +<br><br> + <frameset rows="64,*"><br><br> + <frame name="top_frame" noresize="noresize" scrolling="no"<br><br> + src="frame_top.html"><br><br> + <frameset cols="450,*"><br><br> + <frame name="left_frame" scrolling="auto"<br><br> + src="frame_left.html"><br><br> + <frame name="right_frame" src="frame_right.html"><br><br> + </frameset><br><br> + <noframes><br><br> + <body><br><br> +<br><br> + </body><br><br> + </noframes><br><br> + </frameset><br><br> +<br><br> + </html><br><br> +<br><br> + This is how the priv folder looks like<br><br> + -----------------------------------------------------------<br><br> + ls priv/<br><br> + frame_left.html frame_right.html frame_top.html<br><br> + index.html static<br><br> +<br><br> + This is how I changed the websocket_2_app:start/2 function<br><br> + -----------------------------------------------------------<br><br> + Dispatch = cowboy_router:compile([<br><br> + {'_', [<br><br> +<br><br> + {"/", cowboy_static, {priv_file, websocket_2,<br><br> + "index.html"}},<br><br> + {"/[...]", cowboy_static, {priv_dir, websocket_2,<br><br> + ""}},<br><br> +<br><br> + {"/websocket_2", ws_handler_2, []},<br><br> + {"/static/[...]", cowboy_static, {priv_dir,<br><br> + websocket_2,<br><br> + "static"}}<br><br> + ]}<br><br> + ]),<br><br> +<br><br> + After compile and make release package of the app, I can reach the<br><br> + webserver on the port 8080, but some connection does not set up<br><br> + correctly. The following texts are present in the browser<br><br> + DISCONNECTED<br><br> +<br><br> + ERROR: undefined<br><br> +<br><br> + Connecting to: ws://localhost:8080/websocket_2<br><br> +<br><br> + I made a dbg trace on all cowboy modules, to start some kind of<br><br> + troubleshooting. In the "tons" of printout I can see this one.<br><br> + So in the<br><br> + bottom of this, there is an {error,enoent}. It comes when tries<br><br> + connect<br><br> + to the socket. But unfortunatelly I do not have idea what may<br><br> + cause this :-(<br><br> +<br><br> + The part of trace<br><br> + -----------------------------------------------------------<br><br> + (<0.177.0>) call<br><br> + cowboy_rest:next({http_req,#Port<0.646>,ranch_tcp,keepalive,<0.177.0>,<<"GET">>,'HTTP/1.1',<br><br> + {{127,0,0,1},33241},<br><br> + <<"localhost">>,undefined,8080,<<"/websocket_2">>,<br><br> + [<<"websocket_2">>],<br><br> + <<>>,undefined,[],<br><br> + [{<<"host">>,<<"localhost:8080">>},<br><br> + {<<"connection">>,<<"Upgrade">>},<br><br> + {<<"pragma">>,<<"no-cache">>},<br><br> + {<<"cache-control">>,<<"no-cache">>},<br><br> + {<<"upgrade">>,<<"websocket">>},<br><br> + {<<"origin">>,<<"<a href="http://localhost:8080" rel="noreferrer" target="_blank">http://localhost:8080</a>">>},<br><br> + {<<"sec-websocket-version">>,<<"13">>},<br><br> + {<<"user-agent">>,<br><br> + <<"Mozilla/5.0 (X11; Linux i686)<br><br> + AppleWebKit/537.36<br><br> + (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36">>},<br><br> + {<<"accept-encoding">>,<<"gzip, deflate, sdch">>},<br><br> + {<<"accept-language">>,<<"en-US,en;q=0.8">>},<br><br> +<br><br> + {<<"sec-websocket-key">>,<<"by/gwaQvb/51W7Wa9zrGQg==">>},<br><br> + {<<"sec-websocket-extensions">>,<br><br> + <<"permessage-deflate;<br><br> + client_max_window_bits">>}],<br><br> + [{<<"connection">>,[<<"upgrade">>]}],<br><br> +<br><br> + undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,undefined},{state,[{handler,cowboy_static},<br><br> + {handler_opts,{priv_dir,websocket_2,[]}},<br><br> + {listener,http},<br><br> + {dispatch,[{'_',[],<br><br> + [{[],[],cowboy_static,<br><br> +<br><br> + {priv_file,websocket_2,"index.html"}},<br><br> +<br><br> + {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}},<br><br> +<br><br> + {[<<"websocket_2">>],[],ws_handler_2,[]},<br><br> + {[<<"static">>,'...'],<br><br> + [],cowboy_static,<br><br> +<br><br> + {priv_dir,websocket_2,"static"}}]}]}],<br><br> + <<"GET">>,cowboy_static,<br><br> +<br><br> + {<<"/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2">>,<br><br> + {error,enoent},<br><br> + []},<br><br> +<br><br> + undefined,[],undefined,[],undefined,[],undefined,false,undefined,<br><br> + undefined,undefined},#Fun<cowboy_rest.2.41839999>)<br><br> + (Timestamp: {1435,<br><br> +<br><br> + 46126,<br><br> +<br><br> + 935663})<br><br> +<br><br> + I guess, I did something very wrong, but I did not found what is<br><br> + that,<br><br> + thus I would like to get some help from you.<br><br> +<br><br> + Please find my small project in github:<br><br> + <a href="https://github.com/ethrbh/websocket_2" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2</a><br><br> +<br><br> + thanks for your help,<br><br> + /Robi<br><br> +<br><br> +<br><br> +<br><br> + _______________________________________________<br><br> + Extend mailing list<br></div></div><br> + <a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><span class=""><br><br> + <a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br><br> +<br><br> +<br><br> + --<br><br> + Loïc Hoguin<br><br> + <a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br><br> + Author of The Erlanger Playbook,<br><br> + A book about software development using Erlang<br><br> + _______________________________________________<br><br> + Extend mailing list<br></span><br> + <a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><br><br> + <a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br><br> +<br><br> +<br><br> +</blockquote><div class="HOEnZb"><div class="h5"><br> +<br><br> +-- <br><br> +Loïc Hoguin<br><br> +<a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br><br> +Author of The Erlanger Playbook,<br><br> +A book about software development using Erlang<br><br> +</div></div></blockquote></div><br></div><br> + +</tt> diff --git a/_build/static/archives/extend/attachments/20150623/fcdb2d7b/attachment.html b/_build/static/archives/extend/attachments/20150623/fcdb2d7b/attachment.html new file mode 100644 index 00000000..70f7ec08 --- /dev/null +++ b/_build/static/archives/extend/attachments/20150623/fcdb2d7b/attachment.html @@ -0,0 +1,203 @@ +<tt> +<div dir="ltr"><div><div><div><div><div>hello,<br><br></div>Thanks for all. The solution is to put the line at last<br> {<span class=""><span class="">"</span>/[...]<span class="">"</span></span>, <span class="">cowboy_static</span>, {<span class="">priv_dir</span>, <span class="">websocket_2</span>, <span class=""><span class="">"</span><span class="">"</span></span>}}<br><br></div>Now It works as I expect.<br><br></div>thanks for your help again.<br><br></div>br,<br></div>/Robi<br><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-23 11:09 GMT+02:00 Loïc Hoguin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Oh nice catch ahah. We should probably warn when something like this happens.<span class=""><br><br> +<br><br> +On 06/23/2015 11:06 AM, Graham Hay wrote:<br><br> +</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br> +I think the order of your routes is the problem, try putting this line<br></span><br> +<<a href="https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17</a>><span class=""><br><br> +last.<br><br> +<br><br> +On 23 June 2015 at 09:56, Loïc Hoguin <<a href="mailto:[email protected]" target="_blank">[email protected]</a><br></span><div><div class="h5"><br> +<mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>>> wrote:<br><br> +<br><br> + The {error, enoent}, especially there, is probably just because the<br><br> + browser is trying to fetch the favicon.<br><br> +<br><br> + Your issue is that Websocket won't connect, so it has nothing to do<br><br> + with cowboy_rest. Try tracing cowboy_websocket or enable SASL to<br><br> + have more info.<br><br> +<br><br> +<br><br> + On 06/23/2015 10:28 AM, Robert Balogh wrote:<br><br> +<br><br> + hello,<br><br> +<br><br> + First of all I would say I am a beginner in Cowboy web server, so<br><br> + probably I made something wrong, that is why I got the "fault",<br><br> + what I got.<br><br> +<br><br> + I would like to build up web page, where the client can<br><br> + communicate to<br><br> + server, and server can do the same to client, if client does not<br><br> + send<br><br> + anything to server too. The Cowboy has the websocket example,<br><br> + what does<br><br> + what I would like to do.<br><br> +<br><br> + There is only one thing is missing what I would like to have.<br><br> + This is<br><br> + the "frameset". My idea is to build the index.html using framsets. I<br><br> + made this changes, and I build up the html files for the frames,<br><br> + and of<br><br> + course I set these in the index.html.<br><br> +<br><br> + Here is how the index.html looks like<br><br> + <html><br><br> +<br><br> + <head><br><br> + <title>Welcome to Websocket example 2</title><br><br> + </head><br><br> +<br><br> + <frameset rows="64,*"><br><br> + <frame name="top_frame" noresize="noresize" scrolling="no"<br><br> + src="frame_top.html"><br><br> + <frameset cols="450,*"><br><br> + <frame name="left_frame" scrolling="auto"<br><br> + src="frame_left.html"><br><br> + <frame name="right_frame" src="frame_right.html"><br><br> + </frameset><br><br> + <noframes><br><br> + <body><br><br> +<br><br> + </body><br><br> + </noframes><br><br> + </frameset><br><br> +<br><br> + </html><br><br> +<br><br> + This is how the priv folder looks like<br><br> + -----------------------------------------------------------<br><br> + ls priv/<br><br> + frame_left.html frame_right.html frame_top.html<br><br> + index.html static<br><br> +<br><br> + This is how I changed the websocket_2_app:start/2 function<br><br> + -----------------------------------------------------------<br><br> + Dispatch = cowboy_router:compile([<br><br> + {'_', [<br><br> +<br><br> + {"/", cowboy_static, {priv_file, websocket_2,<br><br> + "index.html"}},<br><br> + {"/[...]", cowboy_static, {priv_dir, websocket_2,<br><br> + ""}},<br><br> +<br><br> + {"/websocket_2", ws_handler_2, []},<br><br> + {"/static/[...]", cowboy_static, {priv_dir,<br><br> + websocket_2,<br><br> + "static"}}<br><br> + ]}<br><br> + ]),<br><br> +<br><br> + After compile and make release package of the app, I can reach the<br><br> + webserver on the port 8080, but some connection does not set up<br><br> + correctly. The following texts are present in the browser<br><br> + DISCONNECTED<br><br> +<br><br> + ERROR: undefined<br><br> +<br><br> + Connecting to: ws://localhost:8080/websocket_2<br><br> +<br><br> + I made a dbg trace on all cowboy modules, to start some kind of<br><br> + troubleshooting. In the "tons" of printout I can see this one.<br><br> + So in the<br><br> + bottom of this, there is an {error,enoent}. It comes when tries<br><br> + connect<br><br> + to the socket. But unfortunatelly I do not have idea what may<br><br> + cause this :-(<br><br> +<br><br> + The part of trace<br><br> + -----------------------------------------------------------<br><br> + (<0.177.0>) call<br><br> + cowboy_rest:next({http_req,#Port<0.646>,ranch_tcp,keepalive,<0.177.0>,<<"GET">>,'HTTP/1.1',<br><br> + {{127,0,0,1},33241},<br><br> + <<"localhost">>,undefined,8080,<<"/websocket_2">>,<br><br> + [<<"websocket_2">>],<br><br> + <<>>,undefined,[],<br><br> + [{<<"host">>,<<"localhost:8080">>},<br><br> + {<<"connection">>,<<"Upgrade">>},<br><br> + {<<"pragma">>,<<"no-cache">>},<br><br> + {<<"cache-control">>,<<"no-cache">>},<br><br> + {<<"upgrade">>,<<"websocket">>},<br><br> + {<<"origin">>,<<"<a href="http://localhost:8080" rel="noreferrer" target="_blank">http://localhost:8080</a>">>},<br><br> + {<<"sec-websocket-version">>,<<"13">>},<br><br> + {<<"user-agent">>,<br><br> + <<"Mozilla/5.0 (X11; Linux i686)<br><br> + AppleWebKit/537.36<br><br> + (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36">>},<br><br> + {<<"accept-encoding">>,<<"gzip, deflate, sdch">>},<br><br> + {<<"accept-language">>,<<"en-US,en;q=0.8">>},<br><br> +<br><br> + {<<"sec-websocket-key">>,<<"by/gwaQvb/51W7Wa9zrGQg==">>},<br><br> + {<<"sec-websocket-extensions">>,<br><br> + <<"permessage-deflate;<br><br> + client_max_window_bits">>}],<br><br> + [{<<"connection">>,[<<"upgrade">>]}],<br><br> +<br><br> + undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,undefined},{state,[{handler,cowboy_static},<br><br> + {handler_opts,{priv_dir,websocket_2,[]}},<br><br> + {listener,http},<br><br> + {dispatch,[{'_',[],<br><br> + [{[],[],cowboy_static,<br><br> +<br><br> + {priv_file,websocket_2,"index.html"}},<br><br> +<br><br> + {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}},<br><br> +<br><br> + {[<<"websocket_2">>],[],ws_handler_2,[]},<br><br> + {[<<"static">>,'...'],<br><br> + [],cowboy_static,<br><br> +<br><br> + {priv_dir,websocket_2,"static"}}]}]}],<br><br> + <<"GET">>,cowboy_static,<br><br> +<br><br> + {<<"/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2">>,<br><br> + {error,enoent},<br><br> + []},<br><br> +<br><br> + undefined,[],undefined,[],undefined,[],undefined,false,undefined,<br><br> + undefined,undefined},#Fun<cowboy_rest.2.41839999>)<br><br> + (Timestamp: {1435,<br><br> +<br><br> + 46126,<br><br> +<br><br> + 935663})<br><br> +<br><br> + I guess, I did something very wrong, but I did not found what is<br><br> + that,<br><br> + thus I would like to get some help from you.<br><br> +<br><br> + Please find my small project in github:<br><br> + <a href="https://github.com/ethrbh/websocket_2" rel="noreferrer" target="_blank">https://github.com/ethrbh/websocket_2</a><br><br> +<br><br> + thanks for your help,<br><br> + /Robi<br><br> +<br><br> +<br><br> +<br><br> + _______________________________________________<br><br> + Extend mailing list<br></div></div><br> + <a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><span class=""><br><br> + <a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br><br> +<br><br> +<br><br> + --<br><br> + Loïc Hoguin<br><br> + <a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br><br> + Author of The Erlanger Playbook,<br><br> + A book about software development using Erlang<br><br> + _______________________________________________<br><br> + Extend mailing list<br></span><br> + <a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>><br><br> + <a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br><br> +<br><br> +<br><br> +</blockquote><div class="HOEnZb"><div class="h5"><br> +<br><br> +-- <br><br> +Loïc Hoguin<br><br> +<a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br><br> +Author of The Erlanger Playbook,<br><br> +A book about software development using Erlang<br><br> +</div></div></blockquote></div><br></div><br> + +</tt> |