Skip to content

Instantly share code, notes, and snippets.

@masteinhauser
Created August 7, 2014 01:08
Show Gist options
  • Save masteinhauser/96ed2ad36cc074234397 to your computer and use it in GitHub Desktop.
Save masteinhauser/96ed2ad36cc074234397 to your computer and use it in GitHub Desktop.
Elixir Phoenix HEAD Request Debug
$ curl -X HEAD -v http://localhost:4000/bytes/sample.webm
* Adding handle: conn: 0x7fb024004000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fb024004000) send_pipe: 1, recv_pipe: 0
* About to connect() to localhost port 4000 (#0)
* Trying ::1...
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 4000 (#0)
> HEAD /bytes/sample.webm HTTP/1.1
> User-Agent: curl/7.30.0
> Host: localhost:4000
> Accept: */*
>
< HTTP/1.1 200 OK
< connection: keep-alive
* Server Cowboy is not blacklisted
< server: Cowboy
< date: Thu, 07 Aug 2014 01:08:04 GMT
< content-length: 0
< set-cookie: _frontend_key=g3QAAAABZAAQcGhvZW5peF9tZXNzYWdlc3QAAAAA--B99B39D6F59ADCE262E55F7813461AAFDA224FB; path=/; HttpOnly
< cache-control: max-age=0, private, must-revalidate
< Accept-Ranges: bytes
< Content-Type: video/webm
< Content-Length: 314042
<
* transfer closed with 314042 bytes remaining to read
* Closing connection 0
curl: (18) transfer closed with 314042 bytes remaining to read
@masteinhauser
Copy link
Author

$ curl -X HEAD -v http://localhost:4000/bytes/sample.webm                                                                                                                                              
* Adding handle: conn: 0x7f992a804000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7f992a804000) send_pipe: 1, recv_pipe: 0
* About to connect() to localhost port 4000 (#0)
*   Trying ::1...
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 4000 (#0)
> HEAD /bytes/sample.webm HTTP/1.1
> User-Agent: curl/7.30.0
> Host: localhost:4000
> Accept: */*
> 
< HTTP/1.1 200 OK
< connection: keep-alive
* Server Cowboy is not blacklisted
< server: Cowboy
< date: Thu, 07 Aug 2014 01:28:12 GMT
< set-cookie: _frontend_key=g3QAAAABZAAQcGhvZW5peF9tZXNzYWdlc3QAAAAA--B99B39D6F59ADCE262E55F7813461AAFDA224FB; path=/; HttpOnly
< cache-control: max-age=0, private, must-revalidate
< accept-ranges: bytes
< content-type: video/webm
< content-length: 314042
< 
HTTP/1.1 204 No Content
connection: keep-alive
server: Cowboy
date: Thu, 07 Aug 2014 01:28:12 GMT
content-length: 0

* transfer closed with 313919 bytes remaining to read
* Closing connection 0
curl: (18) transfer closed with 313919 bytes remaining to read

@masteinhauser
Copy link
Author

$ curl -X HEAD -v http://localhost:4000/bytes/sample.webm
* Adding handle: conn: 0x7ff578804000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7ff578804000) send_pipe: 1, recv_pipe: 0
* About to connect() to localhost port 4000 (#0)
*   Trying ::1...
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 4000 (#0)
> HEAD /bytes/sample.webm HTTP/1.1
> User-Agent: curl/7.30.0
> Host: localhost:4000
> Accept: */*
> 
< HTTP/1.1 200 OK
< connection: keep-alive
* Server Cowboy is not blacklisted
< server: Cowboy
< date: Thu, 07 Aug 2014 01:44:50 GMT
< set-cookie: _frontend_key=g3QAAAABZAAQcGhvZW5peF9tZXNzYWdlc3QAAAAA--B99B39D6F59ADCE262E55F7813461AAFDA224FB; path=/; HttpOnly
< cache-control: max-age=0, private, must-revalidate
< accept-ranges: bytes
< content-type: video/webm
< content-length: 314042
< 
* transfer closed with 314042 bytes remaining to read
* Closing connection 0
curl: (18) transfer closed with 314042 bytes remaining to read

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment