Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2017
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. $ curl -o file-without-ifrange.mp4 -H'Range: bytes=113868800-222029005' http://localhost/video/file_1920x960.mp4
  2.  
  3. $ curl -o file-with-ifrange.mp4 -H'Range: bytes=113868800-222029005' -H'If-Range: 345a2dd5c8f22e9ffaf250151ea820df' http://localhost/video/file_1920x960.mp4
  4.  
  5. $ ls -lh file-without-ifrange.mp4 file-with-ifrange.mp4
  6. -rw-r--r-- 1 user staff 212M Jul 3 16:39 file-with-ifrange.mp4
  7. -rw-r--r-- 1 user staff 103M Jul 3 16:39 file-without-ifrange.mp4
  8.  
  9. ##### Checking Etag from cached file:
  10.  
  11. $ head -20 /tmp/7/8a/ac18b7bf45855a07bb6b9f05605e78a7
  12. ��cY�eVY\�ZY�?(��+ 345a2dd5c8f22e9ffaf250151ea820df
  13. KEY: http://my_backend/video/file_1920x960.mp4
  14. HTTP/1.1 200 OK
  15. Server: nginx
  16. Date: Mon, 03 Jul 2017 19:34:52 GMT
  17. Content-Type: video/mp4
  18. Content-Length: 222029006
  19. Connection: close
  20. Accept-Ranges: bytes
  21. Last-Modified: Fri, 30 Jun 2017 14:52:43 GMT
  22. Etag: 345a2dd5c8f22e9ffaf250151ea820df
  23. X-Timestamp: 1498834362.33768
  24. X-Trans-Id: tx05e1c2ee38284c5885940-00595a9c5c
  25. Cache-Control: public, max-age=604800
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement