Live data from Hacker News

Show HN: UrlRoulette – Pass a URL to the next visitor

urlroulette.net

31–40 of 143 posts

Re: Show HN: UrlRoulette – Pass a URL to the next visitor

#31
post #29
post #5

Earlier quoted context omitted.

Well, I'm not exactly sure about how to do that. I could implement a list of all the major porn sites, but then people could still post porn URL using URL shorteners...

Steven Black's hosts compilation [1] is a good start for what to disallow. For URL shorteners, you could disallow URLs that trigger an HTTP redirect (e.g. HTTP 301), or you could follow the chain of redirects and apply your rules to the terminal URL. [1] https://github.com/StevenBlack/hosts

If you disallow redirect, it should allow redirects to the same domain.

Re: Show HN: UrlRoulette – Pass a URL to the next visitor

#33
post #25
post #3

Earlier quoted context omitted.

That's odd. UrlRoulette does some sanity checking on the content of the URL. Thank you for this bug report!

You test the URL with a HEAD method that often 404. You should try with GET instead.

A server should respond with the same headers to a HEAD request as to a GET one.

Re: Show HN: UrlRoulette – Pass a URL to the next visitor

#35
post #33
post #25

Earlier quoted context omitted.

You test the URL with a HEAD method that often 404. You should try with GET instead.

A server should respond with the same headers to a HEAD request as to a GET one.

SHOULD and DOES are not the same thing.

Returning 405 'Method Not Allowed' on a HEAD isn't unreasonable, and that is the issue we are seeing.

EDIT: did say GET on prior edit.

Re: Show HN: UrlRoulette – Pass a URL to the next visitor

#36
post #33
post #25

Earlier quoted context omitted.

You test the URL with a HEAD method that often 404. You should try with GET instead.

A server should respond with the same headers to a HEAD request as to a GET one.

They should, but many good sites just don't, for whatever reason. Even ones you know are run by smart people:

  $ curl -I -X HEAD https://redis.io/
  HTTP/1.1 404 Not Found
For this app, being more forgiving is a better idea.

Re: Show HN: UrlRoulette – Pass a URL to the next visitor

#39
post #36
post #33

Earlier quoted context omitted.

A server should respond with the same headers to a HEAD request as to a GET one.

They should, but many good sites just don't, for whatever reason. Even ones you know are run by smart people: $ curl -I -X HEAD https://redis.io/ HTTP/1.1 404 Not Found For this app, being more forgiving is a better idea.

https://www.stumbleupon.com had a similar issue.
Post reply on HN