lingochamp / lingochamp/FileDownloader
某些链接重定向问题
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 11.1k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
在源码中 **RedirectHandler** 的类里,process方法中从
String location = connection.getResponseHeaderField("Location");
是不是应该用 **URL(originUrl, location)** 的方法处理重定向的新URL??
https://pdst.fm/e/http://feeds.soundcloud.com/stream/761934280-whoreibledecisions-ep154-all-about-leather-feat-liquid.mp3
向上面这样类型的URL,connection出现301后,location返回的是
> **/e/http://feeds.soundcloud.com/stream/761934280-whoreibledecisions-ep154-all-about-leather-feat-liquid.mp3**
这种情况下,直接用Location当做newUrl是有问题的吧!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the RedirectHandler class and its process method, then inspect how the response Location header becomes the next URL. Reproduce the 301 case using the pdst.fm example and compare the result with resolving the relative location against the origin URL. Done means this redirect form produces the intended complete URL without breaking other redirects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100