Skip to content

Instantly share code, notes, and snippets.

@akbarovs
Created March 15, 2013 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akbarovs/5171115 to your computer and use it in GitHub Desktop.
Save akbarovs/5171115 to your computer and use it in GitHub Desktop.
php ignores follow_location for most http response codes
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"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment