Skip to content

Commit

Permalink
Merge pull request esl#24 from Lastres/minor_changes
Browse files Browse the repository at this point in the history
Minor changes
  • Loading branch information
dcorbacho committed Jan 15, 2013
2 parents ed9aa8b + f7d0726 commit c1fc78e
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 62 deletions.
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ebin/
ebin/*

doc/edoc-info
doc/*.html
Expand All @@ -14,4 +14,7 @@ test/*.log
*.swp
*.swo

.DS_Store
*.plt
erl_crash.dump

.DS_Store
18 changes: 0 additions & 18 deletions .hgignore

This file was deleted.

18 changes: 0 additions & 18 deletions .hgtags

This file was deleted.

23 changes: 17 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
.PHONY: all release compile test clean rel doc build-plt dialyzer

PROJECT = lhttpc

REBAR := ./rebar
DIALYZER = dialyzer

.PHONY: all doc clean test dialyzer
APPS = kernel stdlib sasl inets ssl public_key crypto compiler

all: compile doc

Expand All @@ -10,14 +15,20 @@ compile:
doc:
$(REBAR) doc

test:
test: compile
$(REBAR) eunit

dialyzer:
$(REBAR) analyze

release: all dialyzer test
release: all dialyze test
$(REBAR) release

clean:
$(REBAR) clean

build-plt: compile
@$(DIALYZER) --build_plt --output_plt .$(PROJECT).plt \
--apps $(APPS)

dialyzer:
@$(DIALYZER) --fullpath --src ./src \
--plt .$(PROJECT).plt --no_native \
-Werror_handling #-Wrace_conditions
4 changes: 0 additions & 4 deletions doc/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions ebin/.gitignore

This file was deleted.

14 changes: 12 additions & 2 deletions include/lhttpc_types.hrl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%%% ----------------------------------------------------------------------------
%%% Copyright (c) 2009, Erlang Training and Consulting Ltd.
%%% All rights reserved.
%%%
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are met:
%%% * Redistributions of source code must retain the above copyright
Expand All @@ -12,7 +12,7 @@
%%% * Neither the name of Erlang Training and Consulting Ltd. nor the
%%% names of its contributors may be used to endorse or promote products
%%% derived from this software without specific prior written permission.
%%%
%%%
%%% THIS SOFTWARE IS PROVIDED BY Erlang Training and Consulting Ltd. ''AS IS''
%%% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
%%% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Expand Down Expand Up @@ -68,3 +68,13 @@

-type window_size() :: non_neg_integer() | infinity.

-type upload_state() :: {pid(), window_size()}.

-type body() :: binary() |
'undefined' | % HEAD request.
pid(). % When partial_download option is used.

-type result() ::
{ok, {{pos_integer(), string()}, headers(), body()}} |
{ok, upload_state()} |
{error, atom()}.
Binary file modified rebar
Binary file not shown.
9 changes: 0 additions & 9 deletions src/lhttpc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@
-include("lhttpc_types.hrl").
-include("lhttpc.hrl").

-type upload_state() :: {pid(), window_size()}.
-type body() :: binary() |
'undefined' | % HEAD request.
pid(). % When partial_download option is used.

-type result() ::
{ok, {{pos_integer(), string()}, headers(), body()}} |
{ok, upload_state()} |
{error, atom()}.

%% @hidden
-spec start(normal | {takeover, node()} | {failover, node()}, any()) ->
Expand Down
2 changes: 1 addition & 1 deletion src/lhttpc_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ send_request(#client_state{socket = undefined} = State) ->
throw(connect_timeout);
{error, timeout} ->
throw(connect_timeout);
{error, "record overflow"} ->
{error, 'record overflow'} ->
throw(ssl_error);
{error, Reason} ->
erlang:error(Reason)
Expand Down

0 comments on commit c1fc78e

Please sign in to comment.