Skip to content

Commit 3cf1b77

Browse files
committed
custom user agent
1 parent bec60d2 commit 3cf1b77

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [Version 1.1.7](https://github.com/dataiku/dss-plugin-sharepoint-online/releases/tag/v1.1.7) - Bugfix release - 2025-07-07
4+
5+
- Custom user agent
6+
37
## [Version 1.1.6](https://github.com/dataiku/dss-plugin-sharepoint-online/releases/tag/v1.1.6) - Bugfix release - 2025-04-01
48

59
- Fix issue with 255+ chars file paths. The new limit is 400 chars, imposed by SharePoint's API.

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "sharepoint-online",
3-
"version": "1.1.6",
3+
"version": "1.1.7",
44
"meta": {
55
"label": "SharePoint Online",
66
"description": "Read and write data from/to your SharePoint Online account",

python-lib/dss_constants.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class DSSConstants(object):
3737
"sharepoint_oauth": "The access token is missing"
3838
}
3939
PATH = 'path'
40-
PLUGIN_VERSION = "1.1.6"
40+
PLUGIN_VERSION = "1.1.7-beta.2"
4141
SECRET_PARAMETERS_KEYS = ["Authorization", "sharepoint_username", "sharepoint_password", "client_secret", "client_certificate", "passphrase"]
4242
SITE_APP_DETAILS = {
4343
"sharepoint_tenant": "The tenant name is missing",
@@ -60,3 +60,4 @@ class DSSConstants(object):
6060
"tinyint": "Integer",
6161
"date": "DateTime"
6262
}
63+
USER_AGENT = "Dataiku SharePoint Plugin"

python-lib/sharepoint_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,7 @@ def get(self, url, headers=None, params=None):
10311031
retries_limit = ItemsLimit(SharePointConstants.MAX_RETRIES)
10321032
headers = headers or {}
10331033
headers["Accept"] = DSSConstants.APPLICATION_JSON
1034+
headers["User-Agent"] = DSSConstants.USER_AGENT
10341035
headers["Authorization"] = self.get_authorization_bearer()
10351036
response = None
10361037
while not is_request_performed(response) and not retries_limit.is_reached():
@@ -1043,6 +1044,7 @@ def post(self, url, headers=None, json=None, data=None, params=None):
10431044
default_headers = {
10441045
"Accept": DSSConstants.APPLICATION_JSON_NOMETADATA,
10451046
"Content-Type": DSSConstants.APPLICATION_JSON_NOMETADATA,
1047+
"User-Agent": DSSConstants.USER_AGENT,
10461048
"Authorization": self.get_authorization_bearer()
10471049
}
10481050
if self.form_digest_value:

0 commit comments

Comments
 (0)