Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
111b381b
Commit
111b381b
authored
Sep 04, 2013
by
Robert Ricci
Browse files
Return proper http status codes
parent
3883f938
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/git/gitmaild
View file @
111b381b
...
...
@@ -89,7 +89,6 @@ if (!$debug) {
open
(
STDERR
,
"
>&STDOUT
")
||
die
"
can't dup stdout: $!
";
}
#
# Main loop - pretty simple!
#
...
...
@@ -116,7 +115,18 @@ while (my $connection = $listen_socket->accept()) {
}
# Child
exit
run_gitmail
(
decode_json
(
$request
->
content
()),
\
%get_vars
);
my
$rv
=
run_gitmail
(
decode_json
(
$request
->
content
()),
\
%get_vars
);
if
(
$rv
==
0
)
{
$connection
->
send_error
(
RC_INTERNAL_SERVER_ERROR
);
$connection
->
close
();
exit
1
;
}
else
{
# This means it worked, but we are not going to return any
# content to the caller
$connection
->
send_status_line
(
RC_NO_CONTENT
);
$connection
->
close
();
}
}
}
...
...
@@ -228,7 +238,7 @@ sub run_gitmail($$) {
#
# Done!
#
return
0
;
return
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment