Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
close connection on git push command
  • Loading branch information
mojombo committed Jul 3, 2008
1 parent 98c43f5 commit 216c964
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions elibs/receive_pack.erl
@@ -0,0 +1,5 @@
-module(receive_pack).
-export([handle/3]).

handle(Sock, _Host, _Header) ->
ok = gen_tcp:close(Sock).
2 changes: 2 additions & 0 deletions elibs/server.erl
Expand Up @@ -45,6 +45,8 @@ handle_method(Sock) ->
case Method of
{ok, "upload-pack"} ->
handle_upload_pack(Sock, Host, Header);
{ok, "receive-pack"} ->
receive_pack:handle(Sock, Host, Header);
invalid ->
gen_tcp:send(Sock, "Invalid method declaration. Upgrade to the latest git.\n"),
ok = gen_tcp:close(Sock)
Expand Down

0 comments on commit 216c964

Please sign in to comment.