Closed WangYihang closed 4 months ago
Same here, cant get on now! 😠
The Location header appears to be set correctly for non-3xx
status codes.
curl http://httpstat.us/200 -H "X-HttpStatus-Response-Location: https://httpstat.us/301" -vv
* Trying 20.40.202.3:80...
* Connected to httpstat.us (20.40.202.3) port 80
> GET /200 HTTP/1.1
> Host: httpstat.us
> User-Agent: curl/8.4.0
> Accept: */*
> X-HttpStatus-Response-Location: https://httpstat.us/301
>
< HTTP/1.1 200 OK
< Content-Length: 6
< Content-Type: text/plain
< Date: Fri, 17 May 2024 13:42:24 GMT
< Server: Kestrel
< Location: https://httpstat.us/301
< Set-Cookie: ARRAffinity=c38d24fc71835a4381b70cf88d3a3a31350c58e4caa72063abf82ef0ba9df09a;Path=/;HttpOnly;Domain=httpstat.us
< Request-Context: appId=cid-v1:3548b0f5-7f75-492f-82bb-b6eb0e864e53
<
200 OK* Connection #0 to host httpstat.us left intact
Description
I wanted to generate an HTTP 302 redirection response via
httpstatus.us
, but got a500 Internal Server Error
when I set both the status code and the Location header for the response.301
,303
,305
,307
, and308
will also return 500.Expected Behaviour
Current Behaviour