Skip to content

Commit a36c7ef

Browse files
authored
Merge pull request #206 from mattn/shallow-405-method-not-allowed-in-process
shallow 405 Method Not Allowed in process()
2 parents d16f527 + c814499 commit a36c7ef

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

goveralls.go

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,20 @@ func process() error {
513513
return fmt.Errorf("unable to read response body from coveralls: %s", err)
514514
}
515515

516-
if res.StatusCode >= http.StatusInternalServerError && *shallow {
517-
fmt.Println("coveralls server failed internally")
518-
return nil
516+
if *shallow {
517+
if res.StatusCode >= http.StatusInternalServerError {
518+
fmt.Println("coveralls server failed internally")
519+
return nil
520+
}
521+
522+
// XXX: It looks that Coveralls is under maintenance.
523+
// Coveralls serves the maintenance page as a static HTML hosting,
524+
// and the maintenance page doesn't accept POST method.
525+
// See https://github.com/mattn/goveralls/issues/204
526+
if res.StatusCode == http.StatusMethodNotAllowed {
527+
fmt.Println("it looks that Coveralls is under maintenance. visit https://status.coveralls.io/")
528+
return nil
529+
}
519530
}
520531

521532
if res.StatusCode != 200 {

0 commit comments

Comments
 (0)