Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: iothub_client_sample_http simplesample_http temp_sensor_anomaly
Revision 9:0b2cab6cfc60, committed 2016-01-15
- Comitter:
- AzureIoTClient
- Date:
- Fri Jan 15 15:49:36 2016 -0800
- Parent:
- 8:1b71bf027eb5
- Child:
- 10:b012891d0a54
- Commit message:
- v1.0.0-preview.4
Changed in this revision
| iothubtransporthttp.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/iothubtransporthttp.c Thu Dec 17 18:23:34 2015 -0800
+++ b/iothubtransporthttp.c Fri Jan 15 15:49:36 2016 -0800
@@ -8,6 +8,7 @@
#include "gballoc.h"
#include <time.h>
+#include "version.h"
#include "iothub_client_private.h"
#include "iothubtransporthttp.h"
@@ -167,7 +168,8 @@
"Authorization":" "
"Content-Type":"application/vnd.microsoft.iothub.json"
"Accept":"application/json"
-"Connection":"Keep-Alive"]*/
+"Connection":"Keep-Alive"
+"User-Agent":"iothubclient1.0.0-preview.7]*/
static bool create_eventHTTPrequestHeaders(HTTPTRANSPORT_HANDLE_DATA* handleData, const IOTHUBTRANSPORT_CONFIG* config)
{
bool result;
@@ -202,7 +204,8 @@
(HTTPHeaders_AddHeaderNameValuePair(handleData->eventHTTPrequestHeaders, "iothub-to", STRING_c_str(temp)) == HTTP_HEADERS_OK) &&
(HTTPHeaders_AddHeaderNameValuePair(handleData->eventHTTPrequestHeaders, "Authorization", " ") == HTTP_HEADERS_OK) &&
(HTTPHeaders_AddHeaderNameValuePair(handleData->eventHTTPrequestHeaders, "Accept", "application/json") == HTTP_HEADERS_OK) &&
- (HTTPHeaders_AddHeaderNameValuePair(handleData->eventHTTPrequestHeaders, "Connection", "Keep-Alive") == HTTP_HEADERS_OK)
+ (HTTPHeaders_AddHeaderNameValuePair(handleData->eventHTTPrequestHeaders, "Connection", "Keep-Alive") == HTTP_HEADERS_OK) &&
+ (HTTPHeaders_AddHeaderNameValuePair(handleData->eventHTTPrequestHeaders, "User-Agent", CLIENT_DEVICE_TYPE_PREFIX IOTHUB_SDK_VERSION) == HTTP_HEADERS_OK)
))
{
result = false;