Skip to content

code urlparse.urlparse(self.uri) has problem in twisted-13.10(windows x64) #2

@howie1013

Description

@howie1013

When I set the proxy with server.py and browse https://www.google.com, it outputs the 501 error.
I find the problem is causing by the below

    # when self.uri = www.google.com:443, 
    # parsed is ParseResult(scheme='www.google.com', netloc='', path='443', params='', query='', fragment='')
    parsed = urlparse.urlparse(self.uri) 

And I change the code to below, it runs without any problem.

    uri = self.uri if self.uri.startswith('https://') else 'https://' + self.uri
    parsed = urlparse.urlparse(uri)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions