Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KNOX-2928 - For malformed url should return 400 bad request instead of 500 #766

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

zeroflag
Copy link
Contributor

What changes were proposed in this pull request?

Using a malformed URL generates http 500 (MalformedURLException) instead of http 400.

How was this patch tested?

curl -k -u admin:admin-password https://localhost:8443/gateway/knoxsso/api/v1/websso?originalUrl=https://localhost:5003gateway/homepage/home/
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 400 Bad Request</title>
</head>
<body><h2>HTTP ERROR 400 Bad Request</h2>
<table>
<tr><th>URI:</th><td>/gateway/knoxsso/api/v1/websso</td></tr>
<tr><th>STATUS:</th><td>400</td></tr>
<tr><th>MESSAGE:</th><td>Bad Request</td></tr>
<tr><th>SERVLET:</th><td>knoxsso-knox-gateway-servlet</td></tr>
</table>

Copy link
Contributor

@smolnar82 smolnar82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zeroflag zeroflag merged commit 8f1fe56 into apache:master Jun 22, 2023
stoty pushed a commit to stoty/knox that referenced this pull request May 14, 2024
… instead of 500 (apache#766)

Change-Id: I557750d54ce437b1236111e7040dddf0be7f1dff
stoty pushed a commit to stoty/knox that referenced this pull request May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants