[ptt-users] Problem with HTTPProtocol.connect(1)
Frank Cohen
fcohen at pushtotest.com
Sat Nov 25 12:56:22 PST 2006
I agree it breaks the RFC. On the other hand don't want TestMaker to
be the traffic cop for poorly implemented RFCs, so I'm choosing to
allow it as an option.
BTW, the TOOL implementation is extensible to provide multiple
protocol handlers, so if my option is truly wrong then I am open to a
"bad boy" protocol handler for MS sites, and a "good angel" handler
for everyone that follows the RFC. :-)
-Frank
On Nov 25, 2006, at 10:29 AM, Dyer, Kevin wrote:
> Frank,
>
> That's because it's illegal per RFC2116 section 14.30. The BNF for the
> location header clearly states that it must be an absolute URI.
>
> Location = "Location" ":" absoluteURI
>
> Relative URI must only be sent using the META refresh tag. Could this
> data have been generated from a Microsoft server, as I've seen several
> illegal headers and proxy rewrites from MS servers.
>
> Kevin
>
>
>
> -----Original Message-----
> From: users-bounces at lists.pushtotest.com
> [mailto:users-bounces at lists.pushtotest.com] On Behalf Of Frank Cohen
> Sent: Saturday, November 25, 2006 12:16 PM
> To: TestMaker users list
> Subject: Re: [ptt-users] Problem with HTTPProtocol.connect(1)
>
> 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
>>
>
> _______________________________________________
> 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