public
Created

php ignores follow_location for most http response codes

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
curl --data "" http://localhost:8000 -v
* About to connect() to localhost port 8000 (#0)
* Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 8000 (#0)
> POST / HTTP/1.1
> User-Agent: curl/7.27.0
> Host: localhost:8000
> Accept: */*
> Content-Length: 0
> Content-Type: application/x-www-form-urlencoded
>
* HTTP 1.0, assume close after body
< HTTP/1.0 201 Created
< Server: BaseHTTP/0.3 Python/2.7.3
< Date: Fri, 15 Mar 2013 16:07:31 GMT
< Content-Type: text/html
< Location: http://localhost:8000?q=1
<
* nread <= 0, server closed connection, bailing
* Closing connection #0
{"success": "ok"}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.