|
Hi all, I have sample file (links.html) Content ---------------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <a href="" class="moz-txt-link-rfc2396E" href="http://pit.dirty.ru/dirty/1/2009/09/17/2/../18243-192009-16a7decc94fe564e251aac8a23843d3c.jpg">"http://pit.dirty.ru/dirty/1/2009/09/17/2/../18243-192009-16a7decc94fe564e251aac8a23843d3c.jpg">ShouldTest</a> </body> </html> -------------------------- Url link is specific and contains '../' after '/2/' - "non-existed" folder. In browsers I can click on link and jpg is loaded Current webtest version uses 2.6 HtmlUnit I execute the following test: <invoke url="" class="moz-txt-link-rfc2396E" href="file://D:/Public/link.html">"file://D:/Public/link.html" /> <clickLink label="ShouldTest" /> I a results I got 404 error Debug log: [clickLink] DEBUG (com.canoo.webtest.steps.request.ClickLink) - Clicking on link with href: http://pit.dirty.ru/dirty/1/2009/09/17/2/../18243-192009-16a7decc94fe564e251aac8a23843d3c.jpg [clickLink] DEBUG (com.gargoylesoftware.htmlunit.html.HtmlAnchor) - Getting page for http://pit.dirty.ru/dirty/1/2009/09/17/2/../18243-192009-16a7decc94fe564e251aac8a23843d3c.jpg, derived from href 'http://pit.dirty.ru/dirty/1/2009/09/17/2/../18243-192009-16a7decc94fe564e251aac8a23843d3c.jpg', using the originating URL file://D:/Public/link.html [clickLink] DEBUG (com.gargoylesoftware.htmlunit.html.HtmlElement) - Firing Event beforeunload (Current Target: HTMLElement for HtmlHtml[<html xmlns="http://www.w3.org/1999/xhtml">]); [clickLink] DEBUG (com.gargoylesoftware.htmlunit.WebClient) - Get page for window named '', using WebRequestSettings[<url="" class="moz-txt-link-rfc2396E" href="http://pit.dirty.ru/dirty/17/18243-192009-16a7decc94fe564e251aac8a23843d3c.jpg">"http://pit.dirty.ru/dirty/17/18243-192009-16a7decc94fe564e251aac8a23843d3c.jpg", GET, EncodingType[name=application/x-www-form-urlencoded], [], {Accept-Language=en-us, Referer=file://D:/Public/link.html, Accept=*/*}, null>] [clickLink] DEBUG (com.gargoylesoftware.htmlunit.WebClient) - Load response for http://pit.dirty.ru/dirty/17/18243-192009-16a7decc94fe564e251aac8a23843d3c.jpg Find URL: http://pit.dirty.ru/dirty/1/2009/09/17/2/../18243-192009-16a7decc94fe564e251aac8a23843d3c.jpg Open URL: http://pit.dirty.ru/dirty/17/18243-192009-16a7decc94fe564e251aac8a23843d3c.jpg The same is reproduced then URL is contained ../../ Find URL: http://pit.dirty.ru/dirty/1/2009/09/17/2/1/../../18243-192009-16a7decc94fe564e251aac8a23843d3c.jpg Open URL: http://pit.dirty.ru/dirty/17/../18243-192009-16a7decc94fe564e251aac8a23843d3c.jpg Try webtest release with HtmlUnit 2.4 - No problems found, all correct opened --
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
Best regards, Roman Parkin Testing Team Lead Texuna Technologies Ltd This email is confidential and may also be privileged. If you are not the intended recipient please notify us immediately and delete this message from your system. Help us to be environmentally responsible. Please do not print this email unless you need to. |
- [Webtest] Non-correct url's transformation with traversal d... Parkin Roman
- Re: [Webtest] Non-correct url's transformation with tr... Marc Guillemot

