Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP/HTTPS urls doesn't work #387

Closed
deamme opened this issue Jul 27, 2015 · 6 comments
Closed

HTTP/HTTPS urls doesn't work #387

deamme opened this issue Jul 27, 2015 · 6 comments

Comments

@deamme
Copy link

deamme commented Jul 27, 2015

States in the documentation that torrentId can be one of the following:

  • magnet uri (utf8 string) -
  • torrent file (buffer)
  • info hash (hex string or buffer)
  • parsed torrent (from parse-torrent)
  • http/https url to a torrent file (string) - Doesn't work
  • filesystem path to a torrent file (string)
@feross
Copy link
Member

feross commented Jul 27, 2015

Are you trying this in the browser? Right now http/https urls to .torrent files don't work there because I completely excluded the simple-get module from the browser. This module makes make the http request, and includes http, which is pretty huge in terms of file size.

Most domains will probably not have the CORS headers configured correctly to allow your website to download the .torrent file. Do you think it's worth adding 50K gzipped, almost doubling the size of the webtorrent library for this feature?

$ browserify -r http | gzip | wc -c
   49400

@deamme
Copy link
Author

deamme commented Jul 27, 2015

@feross I see the problem and of course we shouldn't double the size of the library. I'll close this.

@deamme deamme closed this as completed Jul 27, 2015
@feross
Copy link
Member

feross commented Jul 27, 2015

Actually, maybe this wasn't entirely fair. http includes stream and buffer which are also huge, but those are already included in webtorrent.

$ browserify -r buffer | gzip | wc -c
   10836
$ browserify -r stream | gzip | wc -c
   31852

@deamme
Copy link
Author

deamme commented Jul 27, 2015

It could work out then but I don't really see any sites supporting CORS.

@feross feross reopened this Jul 27, 2015
@feross
Copy link
Member

feross commented Jul 27, 2015

Actually, I just checked and since we started supporting web seeding, the http module is already being pulled in, so this actually adds just 500 bytes to the file size.

We'll support it.

feross added a commit to webtorrent/parse-torrent that referenced this issue Jul 27, 2015
@feross
Copy link
Member

feross commented Jul 27, 2015

Released as 0.54.0.

@feross feross closed this as completed Jul 27, 2015
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants