GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Clarify that "url" parameter to HTTPConnection.request(method, url) is usually an absolute path · Issue #102327 · python/cpython Closed Labels docsDocumentation in the Doc dirDocumentation in the Doc dir DescriptionDocumentationThe current documentation for HTTPConnection.request(method, url) looks like: No description of the "url" parameter is provided besides its name. One might easily assume (as I did originally) that an absolute URL such as However if you look at how the request() method is implemented, you'll notice that it creates an HTTP request line using the
According to RFC 2616 §5.1.2, (1) the "url" in the above examples must be an absolute path (like I recently discovered that a website downloader program of mine was generating improper HTTP requests that were confusing WordPress sites because I was incorrectly passing an absolute URL as the "url" parameter to request() rather than passing an absolute path. I think it would be worth extending the documentation to explain the above constraints on the "url" parameter (and the requirement of the "Host" header), so that it is easier to use the request() method correctly to generate a well-formed HTTP request. I already have a PR proposing specific changes, which I will post shortly. Linked PRsActivity
MetadataMetadataAssigneesLabelsdocsDocumentation in the Doc dirDocumentation in the Doc dir ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |