Questions tagged [cowboy]

Cowboy is a small, fast and modular HTTP server written in Erlang. Cowboy is also a socket acceptor pool, able to accept connections for any kind of TCP protocol.

Cowboy is a small, fast and modular HTTP server written in Erlang. Cowboy is also a socket acceptor pool, able to accept connections for any kind of TCP protocol.

https://github.com/extend/cowboy/

248 questions
0
votes
2 answers

Automatic redirection from port 80 to port 433 in nitrogen over Yaws and Cowboy

I am developing my application using nitrogen framework which runs over Yaws and also over Cowboy web servers. My clients only know this 'domain-name.xx'or 'www.domain-name.xx' which by default hits port 80 (unsecure http), yet always it want…
0
votes
1 answer

Error in using cowboy in Elixir

I'm using the Erlang web framework :cowboy in Elixir, And I got an error in :cowboy_http_req.reply, here is my code: mix.exs is: defmodule Example.Mixfile do use Mix.Project def project do [ app: :example, version: "0.0.1", …
jsvisa
  • 2,987
  • 2
  • 24
  • 30
0
votes
2 answers

Installing an SSL certificate and running nitrogen webframe work over cowboy server over https

I am developing an application using nitrogen web framework over cowboy web server. When i run the server over http is works perfectly well. Now in production the application must run on https. I have modified the cowboy.config file in the etc…
0
votes
1 answer

Error when starting websocket application

I am trying to run the cowboy web socket example but I keep running into an error: {error, {bad_return, {{erws_app,start,[normal,[]]}, {'EXIT', {undef, [{websocket_sup,start_link,[],[]}, …
0
votes
1 answer

Permission denied when using relx for building Cowboy Quick start project

I'm trying to make the Cowboy Quick start project, but I get Permission denied for relx. Even if I run it with sudo make. Any solution for this? sudo make Password: APP cowlib.app.src APP ranch.app.src APP cowboy.app.src APP …
Jonas
  • 121,568
  • 97
  • 310
  • 388
0
votes
1 answer

Exception when running Erlang Cowboy web server in Mac OS X

I'm trying to run a Cowboy web server in Mac OS X 1.9 and I'm getting a stack trace. On a ubuntu box everything runs fine, so I believe this must be something simple to fix if anybody has experienced the problem. The command: ./_rel/bin/cowfarm…
Marcos Oliveira
  • 1,697
  • 1
  • 14
  • 13
0
votes
1 answer

cowboy 'GET' request variables values

Please tell me, how I can get the variables values of the GET request I do so: {Method, Req2} = cowboy_req:method(Req), {FwdIPRaw, Req3} = cowboy_req:header(<<"x-forwarded-for">>, Req2), {ClientCookie, Req4} = cowboy_req:cookie(<<"cook">>,…
Kozlov V
  • 146
  • 5
  • 17
0
votes
1 answer

Can't get request body in onresponse hook

I want to log all requests along with responses to db. I'm using hooks for that. But it looks like I can't get request body in 'onresponse' hook, it's always <<>>. In 'onrequest' hook I can get request body. My hooks defined as: request_hook(Req)…
Fred K
  • 303
  • 1
  • 2
  • 10
0
votes
1 answer

Compile error in Erlang Cowboy -- bug or me?

I'm trying to generate an Erlang Cowboy release by scrupulously following (e.g. cut-and-paste) the Getting Started instructions at: https://github.com/extend/cowboy/blob/master/guide/getting_started.md All goes well until I create Makefile and…
Lloyd R. Prentice
  • 4,329
  • 3
  • 21
  • 31
0
votes
1 answer

Cowboy web server application very slow

I am currently playing around with minimal web servers, like Cowboy. I want to pass a number in the URL, load lines of a file, sort these lines and print the element in the middle to test IO and sorting. So the code loads the path like /123, makes a…
sibbl
  • 3,203
  • 26
  • 38
0
votes
1 answer

how can I start cowboy websocket from other client

I started the cowboy example websocket server in my machine, and tested ok with localhost but in other client it doesn't work how can it work?
ter
  • 289
  • 1
  • 3
  • 6
0
votes
1 answer

how can I send a param into websock connection using cowboy

in cowboy websocket example in toppage_handler.erl handle(Req, State) -> {Echo, Req2} = cowboy_req:qs_val(<<"echo">>, Req), {ok, Req, State}. I want to get the param Echo into the following function for example: …
ter
  • 289
  • 1
  • 3
  • 6
0
votes
1 answer

Erlang/cowboy crash (socket reset) on ab testing

Trying out Cowboy (Erlang) http library, helloworld example: https://github.com/extend/cowboy/tree/master/examples/hello_world When using Apache's "ab" testing tool in this manner, I get "connection reset": d7 ~/cb/cowboy/examples/hello_world %…
LetMeSOThat4U
  • 6,470
  • 10
  • 53
  • 93
0
votes
2 answers

Erlang Cowboy Rest Handler for POST request

The response is 415 (Unsupported Media Type) . Client Side Code: $.ajax({ url: "/book", //contentType: 'application/json', data: {action: "hello", method: "json"}, dataType: "json", type: "POST", complete:…
Zhenguo Yang
  • 3,800
  • 5
  • 18
  • 22
0
votes
1 answer

Cowboy websocket termination error

I am implementing cowboy websocket. Everything is working fine except when user closes the browser it fires websocket_termination and at server end it generates following error:- Error in process <0.298.0> on node 'ews_2@servername.com' with exit…
Jack Daniel's
  • 2,583
  • 22
  • 28
1 2 3
16
17