lingochamp / lingochamp/FileDownloader

某些链接重定向问题

Open
#1,328 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.