MbedTLS, http header

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MbedTLS, http header

1,029 Views
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 Kudos
Reply
3 Replies

970 Views
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 Kudos
Reply

964 Views
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 Kudos
Reply

935 Views
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 Kudos
Reply