Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, windows and java based applications. Get your 30 day free trial.

Discuss your Sahi Pro usage patterns, best practices, problems and solutions. Help others solve their problems and seek help from the community when needed. If you need specific support on your application, please email support @ sahipro.com

Authorization header getting stripped out

anushanush Members
edited May 2012 in Sahi - Open Source
Sahi appears to be stripping out the authorization header from the request. This happens when we're sending a request to our 3rd party payment processor (Stripe). The request contains a basic authorization header. When I compare the modified and unmodified request headers, I noticed that the authorization header is gone.

request.header_unmodified.txt:
POST /v1/tokens HTTP/1.1
Accept: */*
Accept-Language: en-in
Referer: ## removed because forum does not allow links ##
Authorization: Basic *****
Content-Type: application/x-www-form-urlencoded
x-stripe-client-user-agent: {"bindings_version":"1.1.0", "lang":"javascript", "publisher":"stripe", "platform":"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; MALC)"}
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; MALC)
Host: api.stripe.com
Content-Length: 135
Connection: Keep-Alive
Cache-Control: no-cache

request.header_modified.txt:
POST /v1/tokens HTTP/1.1
Accept: */*
Accept-Language: en-in
Referer: ## removed because forum does not allow links ##
Content-Type: application/x-www-form-urlencoded
x-stripe-client-user-agent: {"bindings_version":"1.1.0", "lang":"javascript", "publisher":"stripe", "platform":"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; MALC)"}
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; MALC)
Host: api.stripe.com
Connection: Keep-Alive
Cache-Control: no-cache
Content-Length: 135
Accept-Encoding: gzip

I have added to following line to the exclude list, but it doesn't seem to help:
.*stripe.*

How can I tell Sahi not to strip out the authorization headers?

Environment:
Sahi
 
Version :  V3.5 
Build :  2011-07-19 (change log)  
Check for updates  

--------------------------------------------------------------------------------
Browser
 
UserAgent :  Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; MALC) 
Name :  Microsoft Internet Explorer 
Version :  5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; MALC) 
Native XmlHTTPRequest :  true 
Is Java enabled :  true 
Is cookie enabled :  true 


--------------------------------------------------------------------------------
Operating System
 
Name :  Windows 7 
Version :  6.1 
Architecture :  amd64 
Is process list available :  true 


--------------------------------------------------------------------------------
Java
 
Java Installed Directory :  C:\Program Files\Java\jre6 
JRE Version :  1.6.0_23 
Is keytool available :  true 

Comments

  • Same problem here - this blocks us from using Sahi Pro for our project. Can someone answer?
Sign In or Register to comment.