Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting 401 Unauthorized in v1.2.0 with same code that returned 200 with v1.1.3 #5314

Closed
jsiegenthaler opened this issue Nov 27, 2022 · 2 comments · Fixed by #5306
Closed

Comments

@jsiegenthaler
Copy link

Describe the bug

A logon sequence works perfectly well with axios v1.1.3
Changing nothing more than axios from v1.1.3 to 1.2.0 now results in 401 Unauthorized

To Reproduce

Unfortunately, I cannot reveal the entire log for security reasons
I have studied the detailed axios interceptor logs of a successful v1.1.3 vs failed v1.2.0 session
I have seen the following major difference

1.1.3: response data is logged as plain text, Logging using axios interceptiors:
data: '\r\n' +
'\r\n' +
'\r\n' +

1.2.0: response data is not decoded when logged, Logging using axios interceptiors:
data: '\x1F�\b\x00\x00\x00\x00\x00\x00\x03�=ks�Fr߯���\x18�ZJ�@\x12|��J\x1B���*��U��c;�\x010 g\x05`p\x00(�v\�����_��\x19�\b�"���%�e�\x04���ӯ��\x01_\x7F��ǣ�\x1Fώɻ���\x07\x7F���q�{ģ�h_c�&�0���

Code snippet

No response

Expected behavior

I expect v1.2.0 to work same as v1.1.3 after an upgrade from 1.1.3 to 1.2.0

Axios Version

1.2.0

Adapter Version

http

Browser

n/a, this is a logon sequence to connect to a device via http

Browser Version

No response

Node.js Version

18.12.1

OS

Microsoft Windows 10 Home (10.0.19045)

Additional Library Versions

"axios-cookiejar-support": "^4.0.3",
"axios": "=1.1.3", // 1.2.0 fails
"mqtt": "^4.3.7",
"qs": "^6.11.0",
"tough-cookie": "^4.1.2"

Additional context/Screenshots

No response

@jsiegenthaler
Copy link
Author

Maybe related to #5311

@jsiegenthaler
Copy link
Author

This was a self inflicted issue caused by bad headers. Closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant