cli
cli copied to clipboard
Not following 304 redirect with POST
If I do this http --all -F POST "http://127.0.0.1:37375 @data.csv
I get:
HTTP/1.1 304 Not Modified
Connection: close
Date: Wed, 14 Aug 2019 13:43:09 GMT
Location: http://127.0.0.1:27375/
Server (:37375) logs says that redirect sent, but nothing appeared on :27375
If I do this using curl -L - works as expected, data sends to :27375
Could you please give more info about the environment you run on? windows? I can't reproduce this issue on macos.
I ran this server:
from flask import Flask, redirect
app = Flask(__name__)
@app.route('/', methods=['POST'])
def hello():
return redirect("http://www.example.com", code=304)
locally, and executing http --all -F POST http://127.0.0.1:5000/ hello=World gives me:
HTTP/1.0 304 NOT MODIFIED Date: Tue, 10 Sep 2019 07:39:40 GMT Location: http://www.example.com Server: Werkzeug/0.15.5 Python/3.7.4
I also couldn't reproduce the problem, @struckoff would you mind sharing a reproducer URL?