-
Notifications
You must be signed in to change notification settings - Fork 105
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
safe_url_string handling IPv6 URLs #193
Comments
Temporarily solved this problem by downgrading |
This indeed looks like a bug. |
urlsplit returns |
Hi, i would like to work on this issue |
@himanshu007-creator sure, no problem with that |
Description
Demo spider with settings:
Command to start the spider:
When i use the
JOBDIR
parameter, it cause an exception:I debugged and found that the problem was in
urllib.parse#L202
,as shown below:And when I stopped using the
JOBDIR
parameter and debugged again, I found that the problem still existed. At this point, the problem is in middlewares such asCookieJar
,RetryMiddleware
,RobotsTxtMiddleware
and so on.The problem should be in the creation of the
Request
instance,It called self._set_url and then parsed the urlhttps://[2402:4e00:40:40::2:3b6]
tohttps://2402:4e00:40:40::2:3b6
.When the middlewares create another instance of
Request
based onRequest.url
, calling self._set_url will return the wrong hostname and port.Versions
The text was updated successfully, but these errors were encountered: