MbedTLS, http header

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MbedTLS, http header

1,595 次查看
a8Chcx
Contributor V

Hi,

I am using FRDM-K66 to test my HTTPS client, and it looks fine because I can negotiate with server.

When I send the following http request, always get "invalid token":

#define GET_REQUEST \
 "GET https://192.168.100.1:9882/snore/termmgmt/install/gps HTTP/1.1\r\n" \
 "X_Auth_Token:secureSnoreToken\r\n HOST: 192.168.100.1\r\n\r\n"

 

But it works when I am using the following curl command:

curl -i -k -H "X_Auth_Token:secureSnoreToken" https://192.168.100.1:9882/snore/termmgmt/install/gps

Can anybody tell me how to set up GET request for token in http header?

 

Thanks,

Christie

 

0 项奖励
回复
3 回复数

1,536 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, 

Could you share a Wireshark sniffer with us? I want to check the HTTP header.
I recommend using a sprintf() or string instead of the #define.

Best regards,

Pavel

0 项奖励
回复

1,530 次查看
a8Chcx
Contributor V

Hi Paul,

In Wireshark, all data are encoded and looks like useless...

Do you have any way to see encoded data?

 

Thanks,

Christie

0 项奖励
回复

1,501 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

Does this issue persist if you use it without encryption?
Could you have a version of your code you can share with us? This is easier to have the same environment, I have one k66 for replay this case.

Best regards,
Pavel

0 项奖励
回复