Comparing if 2 URLs have the same original target
java
Solution
Do a HTTP request for each URL and check the HTTP code. If it's a redirect (`30*`), extract the `Location` HTTP header, that should be the "original" URL.
Problem
I have two urls as Java Strings suppose "youtube.com" and "goo.gl/ur2l" and I want to make a function ``` boolean isSame(String url1, String url2) ``` which returns weather both urls direct to the same url at the end or not. how would that be implemented in java ?