httpbin icon indicating copy to clipboard operation
httpbin copied to clipboard

POSTing to the /redirect-to results in 500 internal server error

Open PerMalmberg opened this issue 5 years ago • 1 comments

Reproduce either using httpbin's own UI or run curl -X POST "http://httpbin.org/redirect-to" -H "accept: text/html" -H "Content-Type: application/x-www-form-urlencoded" -d "url=http%3A%2F%2Ffoo.bar&status_code=308"

httpbin responds with

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application.</p>

PerMalmberg avatar Jan 20 '20 12:01 PerMalmberg

I confirm this issue.

$ curl -X POST "http://192.168.14.77/redirect-to" -H "accept: text/html" -H "Content-Type: application/x-www-form-urlencoded" -d "url=http%3A%2F%2Fhttpbin.org%2Fbytes%3D220&status_code=301"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   349  100   291  100    58   4041    805 --:--:-- --:--:-- --:--:--  4847<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application.</p>

sergio-nsk avatar Apr 20 '21 23:04 sergio-nsk