[ptt-users] Problem with HTTPProtocol.connect(1)
Frank Cohen
fcohen at pushtotest.com
Sat Nov 25 09:16:22 PST 2006
I added code to the TOOL HTTPProtocolHandler class to handle
redirects where the host returns a location that does not include the
base information (protocol, host, port.)
Of course, I couldn't find a Web site that does a redirect like this.
(Irony lives on the Web.) So I would ask that you try out the new
code and let me know the results.
Download the tool.jar from the following URL:
http://downloads.pushtotest.com/200611/tool.jar
Replace the TestMaker_home/lib/tool.jar with the new file you
downloaded.
Restart TestMaker and run a script that communicates with a host that
issues a redirect. For instance:
from com.pushtotest.tool.protocolhandler import ProtocolHandler,
HTTPProtocol
http = ProtocolHandler.getProtocol("http")
# Enables the following 2 lines if you want to use the TestMaker
Network Monitor
#http.setProxyHost( "localhost" )
#http.setProxyPort( 8091 )
http.setUrl( "http://www.pushtotest.com ) # Replace this with your
own URL
http.connect(1)
This version of tool.jar automatically prints debug information that
will help me debug the code. Please let me know if it works, or if
it fails. Thanks!
-Frank
On Nov 24, 2006, at 5:47 PM, Frank Cohen wrote:
> It looks like I will have some time this weekend to add the browser
> emulation capability for redirects. Is anyone aware of URL's that
> do redirects? If so, send me a few links that I can test the code
> against. Thanks.
>
> Also, I'm expecting to write redirect emulations for MS Internet
> Explorer and Foxfire. What other browsers are people using?
>
> -Frank
>
>
> On Nov 21, 2006, at 12:00 PM, Frank Cohen wrote:
>
>> Hi Aaron: I've taken a look at this in the past and found that the
>> browsers handle redirects differently.
>>
>>
>>
>> On Nov 21, 2006, at 8:11 AM, Aaron Romeo wrote:
>>
>>> Hello,
>>>
>>> I have a problem with the HTTPProtocol.connect(1) function.
>>>
>>> The website I am testing uses a path to redirect. For example,
>>> if the base
>>> URL is www.myurl.com, the first page might be www.myurl.com/
>>> default.html.
>>> On this page, I have another link that links me to second.html.
>>> The browser
>>> can identify that I am referring to www.myurl.com/second.html.
>>> However
>>> TestMaker doesn't contain my base and host URL anymore. It has
>>> also lost
>>> the protocol.
>>>
>>> Can someone tell me how I can get around this? I would really
>>> like to have
>>> TestMaker handle my redirects for me.
>>>
>>> Thanks,
>>> --
>>> Aaron Romeo
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.pushtotest.com
>>> http://lists.pushtotest.com/mailman/listinfo/users
>>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.pushtotest.com
>> http://lists.pushtotest.com/mailman/listinfo/users
>>
>
> _______________________________________________
> Users mailing list
> Users at lists.pushtotest.com
> http://lists.pushtotest.com/mailman/listinfo/users
>
More information about the Users
mailing list