Clare Barrington
Clare Barrington

Reputation: 1155

MWS Address and OriginalString different for HttpWebRequest

Something weird is happening which might be causing the issues I have been having recently (signature not matching / Content-MD5 missing).

When I create a new WebRequest:

var request = (HttpWebRequest)WebRequest.Create(amazonConfig.DomainName + "?" + queryString);

queryString = 
AWSAccessKeyId=***&Action=SubmitFeed&Merchant=***&MWSAuthToken=***&SignatureVersion=2&Timestamp=2015-07-01T15%3A27%3A06Z&Version=2009-01-01&SignatureMethod=HmacSHA256&FeedType=_POST_PRODUCT_DATA_&PurgeAndReplace=false&Signature=***

The querystring is as expected (encoded). However the moment I hover over var response:

The Address is (not the lack of encoding see timestamp/also the case for signature):

https://mws.amazonservices.co.uk/?AWSAccessKeyId=***&Action=SubmitFeed&Merchant=***&MWSAuthToken=***&SignatureVersion=2&Timestamp=2015-07-01T15:27:06Z&Version=2009-01-01&SignatureMethod=HmacSHA256&FeedType=_POST_PRODUCT_DATA_&PurgeAndReplace=false&Signature=***

The OriginalString is (encoding exists):

https://mws.amazonservices.co.uk/?AWSAccessKeyId=***&Action=SubmitFeed&Merchant=***&MWSAuthToken=***&SignatureVersion=2&Timestamp=2015-07-01T15%3A27%3A06Z&Version=2009-01-01&SignatureMethod=HmacSHA256&FeedType=_POST_PRODUCT_DATA_&PurgeAndReplace=false&Signature=***

The RequestUri is also incorrect (except the OriginalString which is encoded correctly).

Is this normal or could this in fact be causing my issues?

Thanks

Clare

Upvotes: 1

Views: 67

Answers (1)

Clare Barrington
Clare Barrington

Reputation: 1155

Please see my other questions for:

Signature issue: Signature calculated does not match the signature you provided Amazon

Content MD5: ContentMD5Missing - Amazon Webservice

The main response to this is do not worry that the Address / OriginalString do not match, it doesn't seem to cause any issues.

Upvotes: 1

Related Questions