Library Should Support Virtual Hosting #3

Closed
johngluck65 opened this Issue Mar 29, 2012 · 3 comments

Comments

Projects
None yet
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.

@ghost ghost assigned peritus Mar 29, 2012

peritus added a commit that referenced this issue Apr 8, 2012

@peritus

This comment has been minimized.

Show comment
Hide comment
@peritus

peritus Apr 8, 2012

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.

Owner

peritus commented Apr 8, 2012

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 Apr 8, 2012

@peritus

This comment has been minimized.

Show comment
Hide comment
@peritus

peritus Apr 8, 2012

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

Owner

peritus commented Apr 8, 2012

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

This comment has been minimized.

Show comment
Hide comment
@johngluck65

johngluck65 Apr 10, 2012

Cool. Thanks


From: Filip Noetzel reply@reply.github.com
To: johngluck65 john_gluck@yahoo.com
Sent: Sunday, April 8, 2012 9:23 AM
Subject: Re: [robotframework-httplibrary] Library Should Support Virtual Hosting (#3)

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.


Reply to this email directly or view it on GitHub:
#3 (comment)

Cool. Thanks


From: Filip Noetzel reply@reply.github.com
To: johngluck65 john_gluck@yahoo.com
Sent: Sunday, April 8, 2012 9:23 AM
Subject: Re: [robotframework-httplibrary] Library Should Support Virtual Hosting (#3)

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.


Reply to this email directly or view it on GitHub:
#3 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment