This is a migrated thread and some comments may be shown as answers.

Fiddler seems to "fix" a 401 Unauthorized error

1 Answer 171 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Joseph
Top achievements
Rank 1
Joseph asked on 05 Jul 2020, 12:21 AM

So, first let me apologize for being in way over my head.  Now that that's out of the way....

I was wondering if someone could maybe help me explain why an API call made from .NET (specifically the Invoke-RestMethod cmdlet in powershell) might return a 401 Auth Error when executed without fiddler, but return data as expected while fiddler is open?  This behavior occurs using both HTTP and HTTPS (I found an article from way back mentioning Fiddler used a specific TLS regardless of the client request, but this does not seem to be the case anymore).

I've typically only interacted with this particular API via PHP and cURL, but I needed a windows application.

It would seem to me that the explanation is that Fiddler is somehow modifying the request my application is sending, but I have no idea how to look for that.

If this isn't the correct place for this question, my bad.

 

1 Answer, 1 is accepted

Sort by
0
Joseph
Top achievements
Rank 1
answered on 05 Jul 2020, 01:26 AM
So, the answer to this question is my script was inserting \r\n between each option in my authorization header which Fiddler was removing.
Tags
Fiddler Classic
Asked by
Joseph
Top achievements
Rank 1
Answers by
Joseph
Top achievements
Rank 1
Share this question
or