forked from luraproject/lura
-
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.
Merge pull request luraproject#708 from luraproject/error_content_type
Add the encoding to the HTTPResponseError
- Loading branch information
Showing
6 changed files
with
22 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,7 @@ func TestKrakenD_ginRouter(t *testing.T) { | |
"trusted_proxies": []interface{}{"127.0.0.1/32", "::1"}, | ||
"remote_ip_headers": []interface{}{"x-forwarded-for"}, | ||
"forwarded_by_client_ip": true, | ||
"return_error_msg": true, | ||
} | ||
|
||
ignoredChan := make(chan string) | ||
|
@@ -238,7 +239,7 @@ func testKrakenD(t *testing.T, runRouter func(logging.Logger, *config.ServiceCon | |
url: "/detail_error", | ||
headers: map[string]string{}, | ||
expHeaders: incompleteHeader, | ||
expBody: `{"email":"[email protected]","error_backend_a":{"http_status_code":429,"http_body":"sad panda\n"},"name":"a"}`, | ||
expBody: `{"email":"[email protected]","error_backend_a":{"http_status_code":429,"http_body":"sad panda\n","http_body_encoding":"text/plain; charset=utf-8"},"name":"a"}`, | ||
}, | ||
{ | ||
name: "querystring-params-no-params", | ||
|
@@ -454,7 +455,6 @@ func testKrakenD(t *testing.T, runRouter func(logging.Logger, *config.ServiceCon | |
} | ||
}) | ||
} | ||
|
||
} | ||
|
||
func setupBackend(t *testing.T) (*config.ServiceConfig, error) { | ||
|
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