Skip to content

Loading…

Library Should Support Virtual Hosting #3

Closed
johngluck65 opened this Issue · 3 comments

2 participants

@johngluck65

Steps to Reproduce
This needs to be on server that is set up to support virtual hosting

For example: http://httpd.apache.org/docs/2.0/vhosts/examples.html

  1. Create HTTP Context with www.myfirstdomain.com (This apparently sets the Host: resquest header)
  2. Now do a GET on http://www.myseconddomain.com

Expected

Actual

  • The location response header shows www.myseconddomain.com (or if it's a 302 where ever it was redirected to). This is because the call to get appears to be replacing the Host: request header with www.myseconddomain.com. It should only do this if the Host:request header is not already set. Note also that livetest seems to explicitly prevent setting the Host: request header. I don't really understand why it's doing this.
@peritus peritus was assigned
@peritus peritus added a commit that referenced this issue
@peritus Support virtual hosting (#3) fa90e76
@peritus
Owner

So, here's what you do:

Set HTTP Host                 www.myfirstdomain.com
Set Request Header            Host                          www.myseconddomain.com
GET                           /path/without/hostname

There was an unneccessary (if you ask me) check in livetest (that I'm using underneath) that prevented this from working in the first place.

@peritus peritus closed this
@peritus
Owner

Reported upstream at storborg/livetest#7 — and pushed to PyPI as v0.3.1 http://pypi.python.org/pypi/robotframework-httplibrary/0.3.1

@johngluck65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.