This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author BitTorment
Recipients BitTorment, ambarish
Date 2008-05-06.23:22:11
SpamBayes Score 0.13731015
Marked as misclassified No
Message-id <1210116132.51.0.133133375194.issue2776@psf.upfronthosting.co.za>
In-reply-to
Content
The problem lines are in AbstractHTTPHandler.do_request():

    scheme, sel = splittype(request.get_selector())
    sel_host, sel_path = splithost(sel)
    if not request.has_header('Host'):
        request.add_unredirected_header('Host', sel_host or host)

When there is a double '/' sel is something like '//path/to/resource'. 
splithost(sel) then gives ('path', '/to/resource').  Therefore the
header 'Host' gets set to 'path'.

I don't understand why sel_host is used in preference for host.  host
holds the correct value, even with the double slashes.  Could someone
explain why sel_host is used at all?
History
Date User Action Args
2008-05-06 23:22:12BitTormentsetspambayes_score: 0.13731 -> 0.13731015
recipients: + BitTorment, ambarish
2008-05-06 23:22:12BitTormentsetspambayes_score: 0.13731 -> 0.13731
messageid: <1210116132.51.0.133133375194.issue2776@psf.upfronthosting.co.za>
2008-05-06 23:22:11BitTormentlinkissue2776 messages
2008-05-06 23:22:11BitTormentcreate