[ htmlunit-Patches-1195509 ] VirtualHost support for underlying HttpClient

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ htmlunit-Patches-1195509 ] VirtualHost support for underlying HttpClient

SourceForge.net
Patches item #1195509, was opened at 2005-05-04 15:46
Message generated for change (Comment added) made by yourgod
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448268&aid=1195509&group_id=47038

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: dan (dlevine004)
Assigned to: Nobody/Anonymous (nobody)
Summary: VirtualHost support for underlying HttpClient

Initial Comment:
There have been several recent emails on the list
between myself, Brad Clarke, Chris Erskine, and Marc
Guillemot about a new feature i brought up (with
subject "Virtual Host feature -- tests?"), so I figured
I would open an RFE.

I guess before I ask about testing I should ask how
everyone who knows what they are doing around here
would recommend implementing this.

I agree that adding another overloaded method to _all_
of the getPage functions would be ugly and unnecessary.
 (I dont quite understand why there are all the
signature calls there are, but I'm sure the old bunch
was a bigger mess!)

Brad,
your thought is to create a static field in
HttpWebConnection that would be set by setVirtualHost
and would be checked within getResponse ager getting
httpClient and set the vhost there if set?  (I'm
guessing static value is what you mean by "store the
value in HttpWebConnection" since there is no handle to
the particular HttpWebConnection created through
WebClient.)  That would work.

Another thought would be to add it as a parameter to
WebConnection.getResponse(..) functions, but that
doesnt change the fact that somewhere in WebClient it
would have to be set.  There could be a
WebClient.setVirtualHost and then WebClient would pass
it into HttpWebConnection without changing sigs on
getPage.  This would put it into the WebConnection
abstract method sig and would thus be spread to
MockWebConnection and DebuggingWebConnection.  This
seems like a good thing, but I dont know how they all
play out.  There could be an overloaded function in the
abstract WebConnection that would forward the old sig
to the new sig, but that strikes me as ugly and
unnecessary since there are not too many external
references.

dan levine

----------------------------------------------------------------------

>Comment By: Brad Clarke (yourgod)
Date: 2005-07-11 12:31

Message:
Logged In: YES
user_id=257129

I confined the change to HttpWebConnection and move the
setting of virual host to the same location as the rest of
the HttpClient setup.


----------------------------------------------------------------------

Comment By: Brad Clarke (yourgod)
Date: 2005-05-11 17:17

Message:
Logged In: YES
user_id=257129

Moving to patches

----------------------------------------------------------------------

Comment By: dan (dlevine004)
Date: 2005-05-05 17:41

Message:
Logged In: YES
user_id=1216477

here is a patch for HttpWebConection, WebClient, and
WebClientTest

i've never done this before, so let me know if i did
anything wrong...

----------------------------------------------------------------------

Comment By: Brad Clarke (yourgod)
Date: 2005-05-05 16:05

Message:
Logged In: YES
user_id=257129

Just in HttpWebConnection should be enough and it's easy to
move it into WebConnection later if needed.

----------------------------------------------------------------------

Comment By: dan (dlevine004)
Date: 2005-05-05 15:53

Message:
Logged In: YES
user_id=1216477

I see what you mean now.  That makes sense.  And you would
suggest putting this in just HttpWebConnection or in
WebConnection?

----------------------------------------------------------------------

Comment By: Brad Clarke (yourgod)
Date: 2005-05-05 10:17

Message:
Logged In: YES
user_id=257129

HttpWebConnection.get/setVirtualHost would not be static.
You can get the used instance of HttpWebConnection by
casting WebClient.getWebConnection() or by creating a new
HttpWebConnection and using WebClient.setWebConnection()


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448268&aid=1195509&group_id=47038


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop