-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ondřej Benkovský
committed
Apr 16, 2024
1 parent
b344b56
commit 3850667
Showing
4 changed files
with
45 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package doh | ||
|
||
import "fmt" | ||
|
||
// UnexpectedServerHTTPStatusError error indicating that DoH server responded with bad HTTP status code. | ||
type UnexpectedServerHTTPStatusError struct { | ||
code int | ||
} | ||
|
||
func (u UnexpectedServerHTTPStatusError) Error() string { | ||
return fmt.Sprintf("unexpected upstream server response HTTP status: %d", u.code) | ||
} | ||
|
||
// HTTPStatus HTTP status code returned by the DoH Server. | ||
func (u UnexpectedServerHTTPStatusError) HTTPStatus() int { | ||
return u.code | ||
} |