Conversation
|
||
<securecookie host="^www\.campusship\.ups\.com$" name=".+" /> | ||
|
||
|
||
<rule from="^http://(?:www\.)?ups\.com/" | ||
<rule from="^http://(?:www\.)?ups\.com/(assets/|favicon\.ico|img/|styles/|stylesheets/)" | ||
to="https://www.ups.com/" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to add a $2 to copy over the path, right? Have you manually tested this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested each of those paths in my browser.
I'll remove change (?:www\.) -> (www\.)
and use $2
--> | ||
<exclusion pattern="^http://www\.ups\.com/WebTracking/track($|\?)" /> | ||
<test url="http://www.ups.com/WebTracking/track" /> | ||
<test url="http://www.ups.com/WebTracking/track?" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally for these types of test URLs we should have query parameters that are meaningful. The goal is not just to satisfy the letter of the coverage rule, but to let the coverage rule be a reminder that the more complex the rewrite rule is, the more likely it is that one of the types of pages it covers will break, so we want to test all the different types of pages.
It may not be possible to get a useful tracking URL that does not expose private data, though. In this case I'd be willing to merge non-valid test URLs for that reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exclusions were already there just commented out, unfortunately I don't have UPS tracking number handy.
I did try 123456
Linkname: UPS: Tracking Information
URL: http://wwwapps.ups.com/WebTracking/track
Post Data:
loc=en_US&HTMLVersion=5.0&USER_HISTORY_LIST=&trackNums=123456&track.x=Track
Post Content Type: application/x-www-form-urlencoded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://wwwapps.ups.com/WebTracking/track
HTTP/1.1 302 Found
Date: Wed, 25 Feb 2015 07:46:51 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Location: https://www.ups.com/one-to-one/login?returnto=https%3a//wwwapps.ups.com/WebTracking/track&reasonCode=-1&appid=ETRACK
Looks like tests are failing because you are missing ".ups.com" after www(.)?apps. |
Fixed, I probably should stop coding while tired. |
Fixes #1039