Categories: None [Edit]

rack-http-pipe

https://rubygems.org/gems/rack-http-pipe
https://github.com/Scalingo/rack-http-pipe
# Rack HTTP Pipe Use to pipe directly a remote HTTP file without buffering it. > /!\ Do not work with WebBrick, tested with puma ## Use case * Given a file named #HASH#.pdf on S3 * You want a clean URL and handling the authentication in front of it ``` GET http:/example.com/download Content-Disposition: attachment;filename=name-fetched-from-db.pdf Content-Length Content-Type etc. ``` ## Usage ```ruby get "/" do http_pipe "http://example.com/iso-ubuntu-1404-64bits", { status: 200, headers: { "Content-Type: application/octet-stream", "Content-Disposition: attachment;filename=ubuntu.iso", } } end ``` See the example directory for an example app using sinatra

Total

Ranking: 147,694 of 183,147
Downloads: 3,474

Daily

Ranking: 51,220 of 183,139
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
9974,496,990rack

Owners

#GravatarHandle
1iconScalingo