p-hatan/ mirror

pub repository

mirror.p-hatan.ir

http_server

0.9.1

Library of HTTP server classes.

This package is discontinued upstream.

Download archive

Readme

Library of HTTP server classes.

This package contains a set of high-level classes that, together with HttpServer, makes is easy to provide content through HTTP servers.

Virtual directory

The VirtualDirectory class makes it possible to easy serve static content from the drive. It supports:

  • Range-based request, making it possible to pause/resume downloads and stream videos.
  • If-Modified-Since based caching.
  • Automatic GZip-compression of content.
  • Ability to follow links within, either throughout the system or in a jailed root.
  • Optional directory listing.

The following example shows how to set up a Virtual Directory of a given path

var virtualDirectory = new VirtualDirectory('/var/www/');
virtualDirectory.serve(new HttpServer('0.0.0.0', 8080));

See VirtualDirectory for more info about how to customize the class.

Virtual host

The VirtualHost class makes it possible to serve multiple hosts on the same address, by using the Host field of the incoming requests. It also provides the ability to work on wildcards for sub-domains.

var virtualHost = new VirtualHost(server);
// Filter out on a specific host
var stream1 = virtualServer.addHost('static.myserver.com');
// Wildcard for any other sub-domains.
var stream2 = virtualServer.addHost('*.myserver.com');
// Requets not matching any hosts.
var stream3 = virtualServer.unhandled;

See VirtualHost for more information.

Changelog

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add http_server
pubspec.yaml
name: http_server
version: 0.9.1
author: Dart Team <misc@dartlang.org>
description: Library of HTTP server classes.
homepage: http://www.dartlang.org
documentation: http://api.dartlang.org/docs/pkg/http_server
dependencies:
  mime: ">=0.9.0 <0.10.0"
  path: ">=0.9.0 <2.0.0"
dev_dependencies:
  unittest: ">=0.9.0 <0.10.0"
environment:
  sdk: ">=0.8.10+6 <2.0.0"

Version history

VersionPublishedArchiveSHA-256
0.6.12013-06-27T19:33:37.572360ZDownload2ff9c71b0376a5b8b33ceeb7f0637a441ed4c70b066aa8fa65244acf5b86e147
0.6.22013-06-28T20:56:27.950820ZDownloaddc9ed93dff4cb062f500c48b94d18b5d49f22721b3066fb772393f4039e01d48
0.6.3+12013-07-09T00:24:29.365150ZDownload3f36d53eb23c250d3e7e286c457b7387413dbea30fa26aadd7a0e42bc6600173
0.6.52013-07-16T00:21:11.475770ZDownload070bfec9afdb9516705c01b4c954c41fcabaf85bebc94c7f0797635017463ef1
0.6.62013-07-17T19:42:09.406810ZDownloade9405cbad68df9c1905c67f44ceaba7bf3e15424c99324a965fedb4817780a30
0.6.82013-07-19T20:56:02.201880ZDownload1fca4f40ae3474bb27f7f80ec682f25785e0db28c72defd25b29e00c626ea426
0.6.92013-07-22T15:15:22.266640ZDownloada7f68e246a246b6b1030cb51333a3767cf4c74e2592b9f2822fa579d8adda30d
0.6.9+22013-07-24T03:59:06.025970ZDownloadf21df13d1f50fd57c8566cd4d4b4e55a04aa089aa1ee51c0a81e965846f3318d
0.6.112013-07-25T05:10:09.226090ZDownload7ba0b0cda9fa5a9ac1526a6f2b6c8ce4e005a4bb23f8e1df731f534ef0596bac
0.6.122013-07-26T20:06:22.410040ZDownload7d017ab5233ae27adbb6b57bee3654e829f356e8b8e9c801e724fc433655d770
0.6.132013-07-30T21:56:34.418130ZDownload4a1a98e00a62b5872a8c5c5367dc869fb750a2480fd991d8426eae934cd9a7b7
0.6.142013-08-02T16:25:49.063700ZDownloadd58d7dfbca4c0902e2b57ba3d35a3d36fa6c175e986d39b0771f41be7fe81838
0.6.15+22013-08-05T22:50:13.514540ZDownload14d72b1195507e09cc25850cd4e5ba04db6890bf984e0945b4414b37102faef1
0.6.15+32013-08-06T20:13:27.254980ZDownload46d8da7dcfd8e30028d59ea60decb92ba8a35eb2a2e139783e897646585f4e25
0.6.172013-08-10T17:35:51.249930ZDownload10664f9f190b35754518a3200acdd04df08ab2e84a89e8303160805592a6a9de
0.6.17+22013-08-12T22:22:21.353170ZDownload0c1e72b8c20fb5c7dc1775a971313a133558a365a6fc277e4291a35889454823
0.6.192013-08-19T16:11:21.352350ZDownload73442af8c1701ceead68a247be10ddac0d3f896fcb0f500bd7d9dc63190fccad
0.6.20+12013-08-22T18:19:47.993050ZDownloadb171db2e49665464b4844531fd03f5c2a83714e7aa6de2a23a93ce95606352ca
0.6.21+32013-08-26T17:43:25.505250ZDownloadda55dde4e52364f72338b997ec65b7cd2f228ad1d801b5491bf9a46c076a95d0
0.7.02013-08-28T19:29:29.351260ZDownload5fc8f4c5bc57d0fbbe0b1072568a8d112e7eb29f31d2874418d583d70edd31b1
0.7.12013-09-03T15:52:47.536770ZDownload2b7441214c68deaceb03a4ed0bdf46478d3c0b937b1db46aef4566cbca95c394
0.7.22013-09-06T15:51:53.702700ZDownloadf7cc39ee76c73ad0bd00960563077757d81d27385e0a5ce5b3f013eb2891bc61
0.7.2+12013-09-08T15:47:51.319770ZDownload98944d33818537a09a13006b426247fb26174e9916587e46d5861a3d9f877da0
0.7.3+12013-09-16T15:44:37.693450ZDownload17f8a110aa021afbd7b846592310cf1e49bb6723bb097d70be7a5d80a474cadb
0.7.42013-09-18T03:04:17.762950ZDownload5081abc05a5305f53f80b8dc2182e67cc2af7a29f1e53d50b9f060213487db3a
0.7.52013-09-21T00:42:36.421260ZDownloadd146901d6126d3196c9f90a2556715fd8c1b60b488b4a932ece38b331ff53e74
0.7.62013-09-27T14:58:05.134430ZDownloadbd98905826fed597b0b6d85b1fc4f9a7200c6e03deb63d5263f2e2dc9171ef23
0.7.6+42013-10-01T23:49:09.527900ZDownload0ed8d8681061d7a2977cc9bd597618f05ac05ffb3f9c58bf644cf27a2b6b3388
0.8.02013-10-03T16:28:00.207240ZDownload798adb77cc28933d4a15f19433d09f21d89d529ba71f95ae003c0bf0dc4765f3
0.8.12013-10-04T21:54:47.405330ZDownloadb6ade65c925a1f5791d63de82cdb5d4f530008b49659a62153aa94dde20a8ecf
0.8.22013-10-14T21:48:50.571960ZDownloadb19cc8a7e6b0086bc0e4a12600c5b6780d8c72ccc963b04f84e717fbcac60a0d
0.8.32013-10-17T16:00:59.356660ZDownloade6f41ea0caaf4da2a0fb954275bbebc9bd9cf05170c23d8143a459b34c0c5916
0.8.42013-10-19T21:09:07.414810ZDownload002e908601a4018b14ab8b531709f20102f2c37716be9d74501997987324197b
0.8.52013-10-21T15:50:51.064850ZDownloadf7ca2b8b2336e351417a822d2564149ac395fdcfe6caddd47cd6888842ecda20
0.8.62013-10-24T08:19:33.149510ZDownloadaccc5c401502e5405a245640dbd43050d3109511236dd0aa970ad5f742d2a879
0.8.72013-10-28T14:34:02.342840ZDownloadceede038acb9fa8df453830a8eee22ebc1cab119f9f9375fea195be11bcafe34
0.8.82013-10-30T03:29:47.466660ZDownload8fc823763f64344065e4039a29c56e5426448a5c7aa5fb3760b9fe832afcf97c
0.8.92013-10-31T15:16:11.924640ZDownload86bb878c20a82992b697f7ce015fe92d2565fa2236612bab981351d0904e0867
0.8.102013-11-01T19:23:33.342770ZDownload937b7c5e279fcf41b3b508cd06634abec03a756e0ceee22898d762f225c54420
0.8.10+32013-11-04T16:49:31.258480ZDownload07c460047d8c211bf01b604c88551a9f4070455999cbd0a100af300fd6957ca5
0.8.10+42013-11-05T16:05:42.472470ZDownloade69c8d09677eae079c8f67f7e804a155d6c4c4896dcececab61ded516f194a80
0.9.02013-11-06T19:31:58.679450ZDownloaddec8ed2fbc82bf3c5c46a3078711fb1c2d95909e7809954a00cd51e6f4fe7e24
0.9.12013-12-10T19:27:02.546240ZDownloadcc5fdc8985c7e573c1a2385b7b5564a8332434899b37d2d7e798dd43c2b4d85d
0.9.22014-03-28T17:37:56.692880ZDownloadf5eeda2d1bb40399bf7d3605cab3165dd306a8b4b576f516cb44ab74819d1123
0.9.2+12014-06-27T15:52:36.284420ZDownloadb202725f8905666243f9e94709f8fa7e8612f1cdac2012723a2a3efa187de0cc
0.9.2+22014-07-04T13:19:42.138430ZDownloadf6ef986d632ed24b0c5368984fda6718e4dfad5af45135aa712f388f893660c8
0.9.2+32014-07-24T20:26:52.562950ZDownload7027908fd8ce828f4c08732d4bc1c2480aab688d2c11a84fe7b721c5ce0a357c
0.9.32014-07-30T06:52:08.175340ZDownloadf5544be28f8c51d65f0405896707a093bc2421c859fc44733b87ac7ad1e16581
0.9.42014-11-17T16:36:44.618360ZDownload9d3f828826d73a013ed26996e08ad307f1dc70a2f436adad329b4171f6753d49
0.9.52014-11-19T11:26:03.749030ZDownload116e70abd335e2f434ee0be2ea29f86138793e5e60104486deccd25d702c0090
0.9.5+12014-11-24T18:17:11.274490ZDownload7510553faff5237993d2a3c47bfd23ae00407eeadb54f8a7f9c0a1c3086ceadb
0.9.62016-08-18T14:34:05.845ZDownload30a4c54093bb46d459943a875ab198cb35f3e0a31c2cc0e25c9db75bc6885fda
0.9.72018-02-02T01:08:44.766804ZDownload91a7e6389bd695bc18023355d1b1e035a46ac399bdbb4333b7ae6b9b2c7268f7
0.9.82018-07-11T19:23:16.756269ZDownload0bf07fd0a39e98890802d72072721bf8675999939ce37663ca372c64abe2de45
0.9.8+12018-11-05T22:03:11.868199ZDownload598dea291ddc46275ab3fa09435f702136ada8e8dcee20743a55209f701319f7
0.9.8+22019-06-25T02:26:57.037837ZDownloadc9cead33a4b2b8046a4c52632f4c24ab2404e334130deb980153da2b2701ea55
0.9.8+32019-07-08T16:14:51.122746ZDownload42a9a2824ef3f806429c5fce18475df15b0b0af15b57b8cd62eef51d7bc803ce
1.0.02021-03-18T16:30:20.140042ZDownloadf1fd4de4f57ba5597fddf8029bc0d161e9151a69e1d87ccddec901d2b5a45b10

Dependencies

mime "\u003e=0.9.0 \u003c0.10.0"

path "\u003e=0.9.0 \u003c2.0.0"