Skip to content

Instantly share code, notes, and snippets.

View cmullaparthi's full-sized avatar

Chandrashekhar Mullaparthi cmullaparthi

View GitHub Profile
@cmullaparthi
cmullaparthi / gist:397015
Created May 11, 2010 07:31
ibrowse CONNECT patch
diff --git a/src/ibrowse_http_client.erl b/src/ibrowse_http_client.erl
index 4fdb334..19a7b47 100644
--- a/src/ibrowse_http_client.erl
+++ b/src/ibrowse_http_client.erl
@@ -38,12 +38,15 @@
-include("ibrowse.hrl").
--record(state, {host, port,
+-record(state, {host, port, connect_timeout,
@cmullaparthi
cmullaparthi / gist:970738
Created May 13, 2011 15:30
Timeout handling patch
diff --git a/src/ibrowse.erl b/src/ibrowse.erl
index d219212..996a303 100644
--- a/src/ibrowse.erl
+++ b/src/ibrowse.erl
@@ -425,6 +425,8 @@ do_send_req(Conn_Pid, Parsed_url, Headers, Method, Body, Options, Timeout) ->
{error, req_timedout};
{'EXIT', {noproc, {gen_server, call, [Conn_Pid, _, _]}}} ->
{error, sel_conn_closed};
+ {'EXIT', {normal, _}} ->
+ {error, req_timedout};
-module(tcp_server).
-behaviour(gen_server).
%% API
-export([start_link/0]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-module(debug_relx).
-export([go/0, go/1]).
go() ->
go(".").
go(Dir) ->
Fun = fun collect_app_file/2,
{_, Files} = filelib:fold_files(Dir, ".*.app.src", true, Fun, {[], []}),
Graph = digraph:new(),